LiipImagineBundle icon indicating copy to clipboard operation
LiipImagineBundle copied to clipboard

Cannot clear webP cache

Open phtmgt opened this issue 2 years ago • 4 comments

Steps to reproduce

  1. Change filter settings
  2. Clear cache for a filter
  3. Open newly generated image

Expected result

  1. See updated filter result for both regular (jpg/png) file and webP file.

Actual result

  1. Regular files get proper changes (cache actually gets cleared), while webP version is old filter version (w/out changes)

phtmgt avatar Feb 23 '23 06:02 phtmgt

I have issue with webp file too. In a image gallery manager i wrote, when i delete an image from the gallery, i want the cache be removed too. I use cacheManager to do it, but it only removed the image with the base extension and leave the webp file.

tekodragoon avatar Feb 27 '23 21:02 tekodragoon

I have this same issue. Any chance that this will be fixed?

kamilwyremski avatar Aug 29 '23 14:08 kamilwyremski

Same issue. Calling \Liip\ImagineBundle\Imagine\Cache\CacheManager::remove will not remove the WebP image when using this configuration:

liip_imagine:
    webp:
        generate: true

I wonder if https://github.com/Vigicorp/LiipImagineBundle/commit/835875f82e20d3bc990a11f8a6b7ddac56784a44 is the proper way to handle this.

damienalexandre avatar Oct 10 '23 08:10 damienalexandre

An update on this issue, you can call \Liip\ImagineBundle\Service\FilterService::bustCache to remove both the JPEG and the WebP for a known image and filter:

$imagineFilterService->bustCache('999/banner.jpg', 'profile_banner');

damienalexandre avatar Oct 10 '23 08:10 damienalexandre