- Issue created by @j-barnes
- Status changed to Needs review
about 1 year ago 2:25pm 6 November 2023 - @j-barnes opened merge request.
When utilizing the replace file functionality on an image field that uses for example the Image Widget Crop, the style thumbnail isn't updated which leads to having to manually flush styles to crop newly replaced images. It would be great if we added an image_path_flush when the user chooses to replace the file (same way they do in Media Entity File Replace).
We should be able to do something similar to this, need to cast because the callback currently returns a string.
// Clear image cache for this file if it is a replace.
if ((int) $replace === 1) {
image_path_flush($file->getFileUri());
}
Needs review
3.0
Code