Images fail to load in Adobe Experience Manager as a Cloud Service

In Adobe Experience Manager as a Cloud Service, images can fail to load and appear as broken in the browser. Network requests repeatedly redirect, causing image URLs to grow with duplicated path segments and preventing images from loading correctly. To fix this issue, update the dispatcher rewrite rule so it doesn’t reprocess image URLs that already use the correct content path.

Description description

Environment

  • Product: Adobe Experience Manager as a Cloud Service
  • Instance: Staging

Symptoms

  • Images fail to load and appear broken in the browser.
  • Network activity shows repeated 302 or 304 redirect responses for image requests.
  • Image URLs display recursive, looping path segments, with portions of the path repeated multiple times.

Cause

A dispatcher rewrite rule redirects image URLs to a full content path but doesn’t prevent itself from matching already-correct paths. This behavior results in infinite redirect loops and malformed URLs.

Resolution resolution

Follow the steps below to resolve the issue.

  1. Identify the dispatcher configuration file that contains the rewrite rules for your environment (for example, /etc/httpd/conf.d/rewrites/your-site.rules).

  2. Locate the rewrite rule responsible for redirecting short image URLs to the full /content/... path. For example:

    RewriteRule (.*)/(_jcr_content)/(.*)\.(jpg|jpeg|png|svg|gif)$ /content/your-site$1/$2/$3.$4 [ R=302,L]

  3. Add a guard condition immediately before the affected rule to prevent it from matching URLs that already start with /content/:

    RewriteCond %{REQUEST_URI} !/content/

  4. The updated rules should appear as follows:

    RewriteCond %{REQUEST_URI} !/content/

    RewriteRule (.*)/(_jcr_content)/(.*)\.(jpg|jpeg|png|svg|gif)$ /content/your-site$1/$2/$3.$4 [ R=302,L]

  5. Deploy the updated dispatcher configuration to all affected dispatcher instances in your staging environment.

  6. Verify the fix by reloading the site and confirming that image requests return a 200 OK response and that images display correctly.

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