Welcome, Guest
Username: Password: Remember me

TOPIC: Image thumbnail settings

Image thumbnail settings 08 Feb 2012 14:44 #1203

  • mossss
  • mossss's Avatar
  • Offline
  • Premium Member
  • Posts: 100
  • Thank you received: 7
  • Karma: 9
is there any way to adjust the quality settings for the thumbnail creation?

At the moment my 200px wide png thumbs are between 45 and 60k each but I'd like to reduce to quite a bit lower than that.

I have found a quality setting in the attributes in the classes/images.php which is set at 80 by default. I have tried reducing this, even down to 10, but it seems to make no difference, the resultant thumb is identical size to when it was set at 80.

Is there any other place this can be set?

thanks
The administrator has disabled public write access.

Re: Image thumbnail settings 08 Feb 2012 14:54 #1204

  • mossss
  • mossss's Avatar
  • Offline
  • Premium Member
  • Posts: 100
  • Thank you received: 7
  • Karma: 9
just noticed that the only difference this quality setting makes is on the modal preview
The administrator has disabled public write access.

Re: Image thumbnail settings 08 Feb 2012 15:33 #1206

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3706
  • Thank you received: 984
  • Karma: 140
Excellent question.


Your component create hidden thumb files. Theses files start with a point.
If you work under macintosh, you don't see them.
Find a way to be able to see them. (personally, I use a FTP browser for that : Transmit)

These files are named respectively with theses parameters. But the quality param is not handled in the thumb file name.

Two solutions :
- Delete the concerned hidden thumb file and redo the operation
- Work with the 'on the fly' mode. It means that your component will always recreate the thumb (use more CPU)
For that, open classes/images.php and change this line :
define(XXXX_IMAGES_PHYSICAL_THUMB, true);		//Create an hidden thumb file with parameters
to :
define(XXXX_IMAGES_PHYSICAL_THUMB, false);		//Create an hidden thumb file with parameters
Coding is now a piece of cake
Last Edit: 08 Feb 2012 15:35 by admin.
The administrator has disabled public write access.

Re: Image thumbnail settings 08 Feb 2012 16:05 #1207

  • mossss
  • mossss's Avatar
  • Offline
  • Premium Member
  • Posts: 100
  • Thank you received: 7
  • Karma: 9
Yes, I can see the thumbs and have tried deleting them and can see that they are recreated on view, but, the size of the thumbs is always the same and too big.

one example.

original optimized .jpg 1024 x 685 - 86k
thumb 80 x 53 .png - 9k
thumb 200 x 133 .png - 44k
thumb 400 x 267 .png - 142k

If I delete all the thumbs, then view them, with the quality setting at 20, or 80, the file sizes and picture quality are identical. At 80, the modal preview looks like the original, at 20, looks very pixelated. But load time for the page is going to be the same either way.

Creating them on the fly every time is one possibility, but I would have thought that this would actually be slower if I'm not wrong, you say increased CPU, ibut surely the same files are going to have to be transferred on load as well as the increased CPU.

I think probably, the thumbs created at upload is going to be the most efficient for this purpose, but I need to find a way to get the thumb sizes down. In most cases I am using the 200px and 400px thumbs and if doing it manually, they can go down to about a quarter of the size they are at the moment, so about 10k for a 200px and about 40k for a 400px with very little noticeable loss in quality.

I didn't quite understand when you said 'But the quality param is not handled in the thumb file name.' do you mean there is no quality adjustment for the thumbs?

thanks
The administrator has disabled public write access.

Re: Image thumbnail settings 08 Feb 2012 16:21 #1208

  • mossss
  • mossss's Avatar
  • Offline
  • Premium Member
  • Posts: 100
  • Thank you received: 7
  • Karma: 9
just realised that this is png8 that I am using as thumbs, which is fine for the thumbs. But I would like the modal preview to be coming from the jpg, is this a possibility?

thanks
The administrator has disabled public write access.

Re: Image thumbnail settings 09 Feb 2012 04:58 #1214

  • mossss
  • mossss's Avatar
  • Offline
  • Premium Member
  • Posts: 100
  • Thank you received: 7
  • Karma: 9
ok, please ignore all that :)

decided to go jpg, I have used png in the past for where I have had transparency needs and will do for any icons etc, but for simple photos, png's just are not necessary. I just hadn't realised quite how bulky png's actually are.

thanks
The administrator has disabled public write access.
Time to create page: 0.073 seconds

Get Started