You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Optimizer is not reliable because of thumbnail generation strategy in Neos #14
Since the package was changed to only be triggered when a thumbnail is refreshed we have to rely on thumbnails actually being created.
Neos currently does NOT create thumbnails when the original image is smaller than the requested dimensions.
This way it can happen that many images in a site use the optimized original.
I tricked the strategy in one project by always allowing Neos to upscale which creates a thumbnail which is then optimized and still smaller than the original. But that shouldn't be the way to go.
True, the only way to solve it as I see it is to have a strategy that always creates thumbnails, even if the dimensions are equal to the original. The originals should never be touched.
I feared as much. An easy way would be to have a forceThumbnailGeneration setting in the ThumbnailConfiguration object and respect that in the ThumbnailService.
But that of course is a core change.
I'm not super excited about overwriting the whole getThumbnail method.
yeah thought the same, would be nice if there wasn't so much logic in that method so it would be easier to override that behavior.. but yeah it'll have to be a core change, but maybe better sooner than never? could also be a global configuration to use originals if dimensions match or not
Don't think so. Every few months I stumble upon the issue again and think about it, but didn't take the time yet to work on the solution. I think most people use some trick like changing default quality or always resize pictures to force the generation of thumbnails.
But of course this is not reliable or the way it should be.
Activity
aertmann commentedon Jan 19, 2017
True, the only way to solve it as I see it is to have a strategy that always creates thumbnails, even if the dimensions are equal to the original. The originals should never be touched.
It could be done by overwriting the
ThumbnailServiceclass to get rid of this logic https://github.com/neos/neos-development-collection/blob/master/Neos.Media/Classes/Domain/Service/ThumbnailService.php#L97Sebobo commentedon Jan 20, 2017
I feared as much. An easy way would be to have a
forceThumbnailGenerationsetting in theThumbnailConfigurationobject and respect that in theThumbnailService.But that of course is a core change.
I'm not super excited about overwriting the whole
getThumbnailmethod.aertmann commentedon Jan 20, 2017
yeah thought the same, would be nice if there wasn't so much logic in that method so it would be easier to override that behavior.. but yeah it'll have to be a core change, but maybe better sooner than never? could also be a global configuration to use originals if dimensions match or not
aertmann commentedon May 5, 2019
Hey @Sebobo is this fixed in the core by now?
Sebobo commentedon May 6, 2019
Don't think so. Every few months I stumble upon the issue again and think about it, but didn't take the time yet to work on the solution. I think most people use some trick like changing default quality or always resize pictures to force the generation of thumbnails.
But of course this is not reliable or the way it should be.