LogoLogo
BlogHelp CenterPrivacyLoginRegister
  • Let's optimize your images
  • Transformations
    • Input formats
    • Image operations
      • Width and height
      • Prevent enlargement
      • Crop
        • Automatic gravity crop
        • Positionable crop
        • Focal point crop
        • Face crop
        • Face hide
        • Aspect ratio crop
      • Fit
      • Cropfit
      • Bound
      • Boundmin
      • Cover
      • Device pixel ratio
      • Flip
      • Rotate
      • Trim
      • Rounded corners
      • Background removal
    • Image filters
      • Adjustment
        • Brightness
        • Contrast
        • Saturate
      • Color manipulation
        • Color overlay
        • Grayscale
        • Duotone
        • Sepia
        • Invert
      • Blur
      • Pixelate
      • Sharpen
      • Face blur
    • Image watermarking
      • Static watermark
      • Dynamic watermark
      • Text watermark
        • Text watermark fonts
    • Image compression
      • Image formats
      • Optipress
      • SVG compression
      • Color management
    • Static content
      • PDF to image
      • JS/CSS optimization
    • Video operations
  • Setup
    • Shortening URLs
      • Origin URL prefix
      • Aliases
      • Presets
      • Rules
    • Connecting storage bucket
      • Amazon S3
      • Google Cloud Storage
      • Microsoft Azure Blob
      • Basic authentication HTTP
    • Security
      • Token security
        • Domain whitelisting
        • URL signature
        • URL sealing
      • Account security
      • Origin security
  • Implementation
    • URL API implementation
    • Responsive images JS plugin
    • CMS plugins
      • Spryker
      • Drupal
      • Kontent.ai
      • Contentful
      • Adobe Commerce (Magento)
        • Basic implementation
        • Advanced implementation
      • Opencart
      • Prestashop
        • Prestashop tutorial
      • Shopware
      • Sylius
      • Wordpress
      • Shopify tutorial
        • Shopify integration
        • Theme files
        • FAQ
      • Commercetools tutorial
      • Ruby wrapper
    • Migrating from another image CDN
  • Caching and acceleration
    • CDN basics
    • Caching interval
    • Invalidation API
    • Warmup API
  • Analytics
    • Dashboards
      • Overview
      • Volumetry
      • Optimization
      • Delivery
      • Top-Ranking
      • RUM
      • Logs API
  • Cloudimage_v6 EOL
Powered by GitBook
LogoLogo

Resources

  • Help center
  • Contact support
  • Developers
  • cloudimage.io

Solutions

  • Media optimization
  • DAM
  • Performance report

Company

  • Blog
  • Service status
  • About us

Legal stuff

  • Terms & conditions
  • Privacy center
  • DMCA

Copyright Β© 2023 Scaleflex

On this page
  • Invalidation
  • Option 1: add version parameter to the origin URL to force the CDN to download the new image
  • Option 2: invalidate images from the Admin panel
  • Option 3: use the Invalidation REST API

Was this helpful?

Export as PDF
  1. Caching and acceleration

CDN basics

Cloudimage caching and invalidation

Cloudimage leverages Content Delivery Networks to accelerate the delivery of your images worldwide. We work with multiple CDN providers to optimise the delivery of your images and provide superb reliability.

In addition to accelerating your images, the CDN provides DDoS (Distributed Denial of Service) protection, which will act as a shield to your servers and avoid any downtime.

CDNs cache images for faster delivery. They usually keep assets cached as long as it is stated in the caching directive. When the original image changes, the CDN won’t automatically detect that, so you need to either change the image URL or invalidate the cached version.

Invalidation

To refresh your images, you can either update the Cloudimage URL or invalidate them to flush them from the resizing servers and the CDN.

Option 1: add version parameter to the origin URL to force the CDN to download the new image

Old image:

//doc.cloudimg.io/sample.li/flat.jpg?w=500

New image:

//doc.cloudimg.io/sample.li/flat.jpg?w=500&vh=xx (where 'xx' represent random numbers)

The vh parameter with any random value makes the URL unique and forces a cache refresh.

Option 2: invalidate images from the Admin panel

If you cannot change the image URLs when changing the origin image, you can still invalidate (flush) the image from the Cloudimage admin console. Log in to the console and navigate to Invalidation, or go to this page - https://admin.cloudimage.io/project/invalidation

First, you need to select the scope of the Invalidation:

  • Original -> targets specific image URLs. Enter up to 10 URLs, separated by commas or line breaks.

  • All -> this option will erase the entire cache generated for your token. Please use it with caution, because after invalidation, the cache needs to be rebuilt, and your first requests would take more time for execution.

Do not use the full path of your image but only the origin_image_url part as invalidation path. For example, to invalidate doc.cloudimg.io/sample.li/flat1.jpg?w=500, you need to input /sample.li/flat1.jpg.

This will remove the image(s) from all CDN nodes and Cloudimage resizing servers.

When the Invalidation request is submitted, it appears in the Invalidation log. Both manual and automatic invalidations are logged there.

Details of the Invalidation Log

Every request has the following parameters:

  • Status - the status of the request:

    • Received - request received successfully

    • Preparing - the Invalidation server prepares the request for execution

    • Flushing Scaleflex servers - deleting the cache in the resizing servers

    • Flushing CDN servers - deleting the cache of the CDN servers

    • Done - the invalidation finished successfully

    • ERROR_CDN_NODE - error in the CDN invalidation step

    • ERROR - general error in some of the invalidation steps

If you encounter ERROR or ERROR_CDN_NODE, click Retry or contact support. Please include the Invalidation ID in your message.

  • Scope - the scope of the request (original / all)

  • Date - the datetime when the request has been submitted for execution. The value is in the local time zone.

  • Invalidation ID - the unique identifier of the request.

  • Invalidation path - if you click on "See links", you can inspect which URLs have been requested for invalidation (applicable for the invalidations with scope "original")

  • Retry - resend the invalidation request if it failed.

Click the Refresh button to reload the invalidation log and view the latest updates.

Option 3: use the Invalidation REST API

You can also automate invalidations by calling the Invalidation API. This is useful for developers managing large-scale projects or CI/CD workflows.

PreviousMigrating from another image CDNNextCaching interval

Last updated 1 month ago

Was this helpful?

Correct format for invalidation: /sample.li/flat1.jpg Incorrect formats for invalidation: /sample.li/flat1.jpg?w=500 doc.cloudimg.io/sample.li/flat1.jpg doc.cloudimg.io/sample.li/flat1.jpg?w=500

🟒
πŸ”΄