Page 1 of 1
only create medium thumbnails
Posted: 06 Dec 2017, 15:22
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
Re: only create medium thumbnails
Posted: 09 Dec 2017, 15:02
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
Re: only create medium thumbnails
Posted: 12 Dec 2017, 10:46
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.
Re: only create medium thumbnails
Posted: 12 Dec 2017, 14:19
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
Jan
Re: only create medium thumbnails
Posted: 13 Dec 2017, 14:45
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
Re: only create medium thumbnails
Posted: 16 Dec 2017, 19:39
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
Re: only create medium thumbnails
Posted: 20 Dec 2017, 13:55
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
Re: only create medium thumbnails
Posted: 20 Dec 2017, 15:17
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