Product Image Ratio 1:1 not working proberly

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Andy
Posts: 8
Joined: 01 Aug 2023, 09:49

Product Image Ratio 1:1 not working proberly

Post by Andy » 01 Aug 2023, 11:04

Typo3 Version: 11.5.16
Aimeos Version: 22.7.2
PHP Version: 8.2

---

Hello everyone,

our product images uploaded in fileadmin are in a square format. The --ai-product-image-ratio value under Settings and Theme is set to 1/1. The cron job for rescaling the product images was also run.

If the product search is called up, the images are still in 3/4 format. After clicking on the product, the thumb is then displayed in list view in 1/1 format.

What do I miss to render the images in proper 1:1 ratio?

Thank you in advance.

User avatar
aimeos
Administrator
Posts: 8020
Joined: 01 Jan 1970, 00:00

Re: Product Image Ratio 1:1 not working proberly

Post by aimeos » 02 Aug 2023, 15:22

The CSS variable is only for displaying the image but you need to scale/crop the images according to the sizes required for your layout. You can define the sizes the preview images are generated for by overwriting this configuration:
https://github.com/aimeos/aimeos-core/b ... hp#L50-L66

Add the configuration to the Resources/Private/Config/controller.php file of you project-specific Aimeos extension instead of adding it via TypoScript because it needs to be available in the backend and the scheduler.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Andy
Posts: 8
Joined: 01 Aug 2023, 09:49

Re: Product Image Ratio 1:1 not working proberly

Post by Andy » 08 Aug 2023, 10:11

Thank you very much! It works as expected now.

alababdiy
Posts: 44
Joined: 30 Apr 2023, 12:46

Re: Product Image Ratio 1:1 not working proberly

Post by alababdiy » 26 May 2024, 14:45

links not working

User avatar
aimeos
Administrator
Posts: 8020
Joined: 01 Jan 1970, 00:00

Re: Product Image Ratio 1:1 not working proberly

Post by aimeos » 27 May 2024, 07:27

The configuration has been moved to the media manager in 2024+:
https://github.com/aimeos/aimeos-core/b ... hp#L38-L64
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply