-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Asset] Stream image thumbnail action improvements #624
Comments
I think this isnt a problem with the endpoint, seems more like a general bug to me. Reproducing the problem:
Why? Because in the endpoint we set
But the core tries to detect the orientation of the image and adds a rotate transformation automatically. Therefore the image gets rotated to the orientation mentioned in the metadata AND the orientation metadata gets preserved, which results in extra rotation, when the image gets displayed. Auto rotate transformation in the core: https://github.com/pimcore/pimcore/blob/3ffaeac8d9f07f877ea4f469015be1774de447b9/models/Asset/Image/Thumbnail/Processor.php#L301 But why do the old admin ui endpoints seemingly provide a correct result?Somehow adding the How to get a correct result with studio endpoint?Just add the quality parameter like this How to reproduce this issue in the ui directly?Use the Quick fixes
IMOIn my opinion there are at least 2 bugs, we would need to investigate:
|
I adopted the behavior, but it still feels strange, e.g.
wont resize the image, but
will. Same behavior can be observed with admin-ui-classic endpoints:
does resize the image, but
doesn´t. Note: Admin ui classic uses PNG as default. In generel I got better results with PNGs. Maybe we should add a default value to PNG here? At least the new endpoint should now work like the admin ui endpoint with SVG and orientation. ResizeMode should be fully optional now. |
This is a follow up to #614
I tested it with this call:
/pimcore-studio/api/assets/{ID}/image/stream/custom?mimeType=JPEG&resizeMode=scaleByWidth&height=200&width=100&contain=true
The pendant in the classic bundle would be:
/admin/asset/get-image-thumbnail?id={ID}&width=200&height=100&contain=true
I received a strange result for a portrait image.
Studio:
Classic Bundle:
Tested it also with an icon SVG:
Studio:
Classic Bundle:
Not sure if my calls are wrong and the URL format needs to be different but at the moment it's strange that I need to combine the resizeMode with contain, cover and frame to create the URL. Maybe
contain
,cover
andframe
need to get resize modes instead?I tested with the following images:
Archiv.zip
The text was updated successfully, but these errors were encountered: