Thumbnail too big

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!
chricken
Posts: 29
Joined: 10 Nov 2017, 15:47

Thumbnail too big

Post by chricken » 22 Nov 2017, 13:25

Hi,
My shop is working now, regardless of some minor issues, which I'm gonna solve by myself.

But there is one big thing, that annoys me.
When I look at the listview, I can see the thumbnails of the products. Unfortunately, the used images are very big.
I am not sure, if they are original size, but I think so.
So I am wondering, why they are not recalculated to a smaller size, which seems very obvious.
Am I missing a setting or how do I do that?

Uploading smaller images is not an option, because then I have these tiny images in the product details.

Regards
Christian

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

Re: Thumbnail too big

Post by aimeos » 22 Nov 2017, 22:11

You can scale the images on upload if you configure their maximum height and/or width. You would want this especially for the preview images:
https://aimeos.org/docs/Configuration/C ... mmon/media

You can rescale existing images after modifying the configuration by running the "Rescale images" job from the Aimeos scheduler task
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

chricken
Posts: 29
Joined: 10 Nov 2017, 15:47

Re: Thumbnail too big

Post by chricken » 24 Nov 2017, 08:49

Thank you for your answer,

I have now entered this configuration into setup-TS:

Code: Select all

plugin.tx_aimeos.settings {
  controller.common.media.standard.files.maxwidth = 800
  controller.common.media.standard.preview.maxwidth = 240
}
After that, I have uploaded a complete new image for one product.
Cleared Cache in Typo3 and Aimeos.
It still has a big filesize. What may I have done wrong?

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

Re: Thumbnail too big

Post by aimeos » 24 Nov 2017, 20:56

In TYPO3, configuration for frontend, backend and scheduler tasks have a different prefix resp. has to be added directly in the TS-Config field of the scheduler task.

Scale images in the admin backend:

Code: Select all

module.tx_aimeos.settings {
  controller.common.media.standard.files.maxwidth = 800
  controller.common.media.standard.preview.maxwidth = 240
}
In the scheduler task for rescaling existing images:

Code: Select all

controller.common.media.standard.files.maxwidth = 800
controller.common.media.standard.preview.maxwidth = 240
Please also have a look into the docs: https://aimeos.org/docs/TYPO3/Change_configuration
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

chricken
Posts: 29
Joined: 10 Nov 2017, 15:47

Re: Thumbnail too big

Post by chricken » 25 Nov 2017, 14:11

Great, thank you :)

that did the trick for both, new images and existing ones (with the scheduler).

User avatar
loeffe1
Posts: 49
Joined: 21 Feb 2020, 10:33

Re: Thumbnail too big

Post by loeffe1 » 10 Jul 2020, 12:39

I created the rescale image scheduled task and added the config

Code: Select all

controller.common.media.standard.preview.maxwidth = 350
to the TypoScript configuration field, but after running the task (which takes a few seconds, so it seems to be doing something) the images are still 240px width.

Is there anything else I need to do?

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

Re: Thumbnail too big

Post by aimeos » 11 Jul 2020, 11:43

Depending on your used Aimeos version, the configuration has changed in 2019 due to support for responsive images:
https://github.com/aimeos/aimeos-core/b ... hp#L31-L43

Now use:

Code: Select all

controller.common.media.standard.previews {
  0 = {
    maxwidth = 350
  }
  1 = {
    maxwidth = 750
  }
  2 = {
    maxwidth = 1050
  }  
}
for three responsive preview image sizes.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
loeffe1
Posts: 49
Joined: 21 Feb 2020, 10:33

Re: Thumbnail too big

Post by loeffe1 » 13 Jul 2020, 14:18

Thanks, this did the trick!

billy678
Posts: 21
Joined: 02 Jun 2022, 15:57

Re: Thumbnail too big

Post by billy678 » 07 Jun 2022, 13:34

I haven't success with this. Cleared all the caches but this isn't working for me.
Is the thumbnail in the basket generated this way as well?
Attachments
scheduler.JPG
scheduler.JPG (75.49 KiB) Viewed 3496 times

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

Re: Thumbnail too big

Post by aimeos » 08 Jun 2022, 16:05

The configuration options have been shortened in Aimeos 2021.x, so the "standard" part has been removed:

Code: Select all

controller.common.media.previews.0.maxwidth = 700
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply