wintercms / winter

Free, open-source, self-hosted CMS platform based on the Laravel PHP Framework.
https://wintercms.com
MIT License
1.38k stars 195 forks source link

imageWidth/imageHeight filters not available on cold cache #1120

Open matteotrubini opened 6 months ago

matteotrubini commented 6 months ago

Package targeted

Winter CMS

Description

Twig filters | imageWidth and | imageHeight are not working until the resized image is generated (on cold cache) as they fail to manage /resizer/* url resource.

When the filter are applied to a /resizer/* resource, ImageResizer::filterGetDimensions() should calculate and return valid values (using the stored configuration?).

Will this change be backwards-compatible?

No breaking changes expected.

LukeTowers commented 4 months ago

@matteotrubini any ideas for an implementation for this?