Original images are being deleted after saving a crop

Created on 21 March 2024, 3 months ago
Updated 4 April 2024, 3 months ago

Problem/Motivation

Drupal\crop\Entity\Crop::postSave() calls image_path_flush(), which in turn is supposed to delete all image derivatives. When using this module, image derivatives are the original image with some query params, which means that the original image is deleted when flushing image derivatives. Yikes.

Proposed resolution

Add Drupal\bunny_optimizer\Entity\BunnyOptimizerImageStyle::flush and make it a stub, not doing anything. Image derivatives don't need to be flushed in our case. We could invalidate the CDN cache, but that would introduce a lot more complexity, this is good enough for now.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium DieterHolvoet Brussels

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024