AEM Sites: Smart Crop image updates delayed after binary swap due to CDN cache invalidation

This article explains why updated Smart Crop image renditions may not appear immediately after a binary swap in Adobe Experience Manager (AEM) Sites and how to ensure prompt cache invalidation for these assets.

Description description

Environment

Adobe Experience Manager (AEM) Sites (all versions)

Issue/Symptoms

  • After performing a binary swap and publishing an image asset in AEM Sites, updated Smart Crop renditions may not appear immediately on your site, even after running CDN cache invalidation.
  • The new images may take several hours to become visible.
  • By default, CDN cache invalidation only targets the base asset URL and does not automatically include Smart Crop rendition URLs, such as those with colon-suffixed preset names or format parameters.
  • Smart Crop rendition URLs, for example, /content/dam/example/image.png:PresetName or /content/dam/example/image.png:PresetName?fmt=png-alpha, may continue to serve the previous image from cache until the cache expires naturally, which can take up to 10 hours.

Cause

CDN cache invalidation in AEM only clears the base asset URL by default. Smart Crop renditions are not invalidated unless they are explicitly included in the CDN Invalidation Template, causing them to serve cached images until their cache expires.

Resolution resolution

Follow the steps below to resolve the issue:

  1. In AEM, go to Tools > Assets > CDN Invalidation > Manage Template.

  2. For each Smart Crop preset used by your pages, add a line to the CDN Invalidation Template in the following format:

    • :PresetName
    • :PresetName?fmt=png-alpha

Repeat this step for each preset and any format-parameter variants your pages request.

3. Save the template.

4. For every future binary swap, run CDN Invalidation and ensure that Use Template is checked (and Use Image Presets if you also use standard image presets). This ensures both the base asset and all registered Smart Crop renditions are invalidated together.

5. Verify that updated images and renditions appear promptly after invalidation by refreshing the affected pages and checking the Smart Crop rendition URLs.

recommendation-more-help
experience-cloud-kcs-help-kbarticles