简体   繁体   中英

Cached Images on Drupal 8

We have a website in Drupal 8 where we are using images and we have different sort of implementation, ranging from custom modules and direct content type and image fields.

The issue is when we replace an image with a new one, whether changing name or image itself, it doesn't reflect on the end user's browser. We clear the Drupal 8 cache after pushing changes, but still, the same issue persists. However, when the user tries in incognito, a new image or name is reflected.

We are not using CDN. Please help us out with how to fix this.

Thanks

I believe it is because the page is cached in user's browser.

  1. Prevent caching of images (Not recommended if there are many images in the site)
  2. Clearing user's browser cache
  3. Adding a randon query string to the page URL

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM