only create medium thumbnails

Phoca Gallery - image gallery extension
John D
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 06 Dec 2017, 11:22

only create medium thumbnails

Post by John D »

Hello,

as our server only has a limited number of inodes, is there any way to tell phoca that it shall only create medium thumbnails? I only found the "Enable Thumbnails Generation" setting which creates all 3 sizes.

thanks in advance
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: only create medium thumbnails

Post by Jan »

Hi, this needs to be customized directly in the code, so the large and small thumbnails will be not created - but both of them are used so no idea how you will display your gallery without these thumbnails. Thumbnails are here to save server performance, memory and traffic so having no thumbnails is for the server worse.

Jan
If you find Phoca extensions useful, please support the project
John D
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 06 Dec 2017, 11:22

Re: only create medium thumbnails

Post by John D »

Hey thank you for your reply.

As i said, we have a limited number of adresses on our server. Currently i use medium thumbnails in the preview section and the small thumbnails in the backend image list (which is not really necessary). The big ones aren't used, because the uploaded picture (which is already compressed) is shown in the detail view. So the small and the big thumbnails aren't needed. This would save us about half of the inodes.

Is there a setting which controls the thumbnail shown in the backend image list, so i can set it to medium? Then the small and big thumbnails would be redundant.

At least the big thumbnails are redundant. So can you please tell me where to change it in the code?

Thank you in advance.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: only create medium thumbnails

Post by Jan »

Hi, the thumbnails are 3 sizes: small, medium and large - they exists all and used on different places - e.g. small is used in frontend in categories view and in backend in image list - it is only one image stored on the server used on different places. For now there is no function which somehow skip creating thumbnails (as written previously - thumbnails are here to protect server traffic, performance and memory). So this needs to be somehow customized in the code :idea:

Jan
If you find Phoca extensions useful, please support the project
John D
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 06 Dec 2017, 11:22

Re: only create medium thumbnails

Post by John D »

Hi,

thank you for your quick response.

I understand your server friendly point. On our site the large thumbnails aren't used anymore, as i set the detail window to show the original picture instead of the large thumbnail. The difference in file size wasn't that big of a deal. So at least these dont need to be created anymore.

As for the small and medium thumbnails, their file size differences are marginal. Therefore i generally want to use the small thumbnails in any preview, be it in the backend or the frontend.
Jan wrote: 12 Dec 2017, 14:19 So this needs to be somehow customized in the code.
I guess that means, that you don't really know where to change it? :) Any hint would be nice.

best regards
Robert
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: only create medium thumbnails

Post by Jan »

I guess that means, that you don't really know where to change it? :) Any hint would be nice.
:-)

I have coded Phoca Gallery in past 10 years and it has over 70.000 lines of code and there are dependencies of different parts so it is not so easy that you can say, this file and this line is the one which cares about this feature.

Thumbnails are created in these libraries:
administrator\components\com_phocagallery\libraries\phocagallery\file\filethumbnail.php
administrator\components\com_phocagallery\libraries\phocagallery\image\imagemagic.php
administrator\components\com_phocagallery\libraries\phocagallery\image\image.php

So when you disable the creating of thumbnails, you need to see the output if it does not ask for the not created thumbnails.

Jan
If you find Phoca extensions useful, please support the project
John D
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 06 Dec 2017, 11:22

Re: only create medium thumbnails

Post by John D »

I didn't mean to offend you. Thank you, now i know where i have to start looking for a solution. I was already viewing some files, but these were not among them. :)

Thank you very much
Cheers
Robert
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: only create medium thumbnails

Post by Jan »

Ok, anyway I didn't feel offended, I just wanted to write, it is not easy to give some clue advice about customizing code when there are a lot of dependencies.

Jan
If you find Phoca extensions useful, please support the project
Post Reply