fix(imagor): use fit-in for thumbnail resizing to match Shopware's aspect-ratio behavior #45
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/imagor-thumbnail-fit-in"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #44.
Root Cause
Shopwares eigene lokale Thumbnail-Erzeugung (
ThumbnailService::calculateThumbnailSize()) passt Bilder in die Zielgröße ein, statt sie zu beschneiden, sobald der Medien-Ordner „Bildseitenverhältnis beibehalten" aktiv hat (Standard bei den meisten Ordnern).RemoteThumbnailUrlSubscriberfragte imagor bisher nur mit/unsafe/WxH/...an — imagors Default dafür ist Crop-to-Fill, wodurch Hochkant-Bilder hart in querformatige Thumbnail-Boxen beschnitten wurden.Fix
ImagorUrlBuilder::build()setzt jetztfit-inals eigenes Pfadsegment (/unsafe/fit-in/WxH/...), sobald konkrete Breite/Höhe angefragt werden — bildet Shopwares Einpass-Verhalten nach. Die Basis-Bild-URL (0x0) ist unverändert.Testplan
php -l