[ansel] Thumbnail generation for gallery uploaded via publish this photo to the web.

Michael Rubinsky mrubinsk at horde.org
Mon Nov 17 21:11:09 UTC 2008


Quoting gimili <gimili17 at gmail.com>:

> Michael Rubinsky wrote:
>>
>> Quoting gimili <gimili17 at gmail.com>:
>>
>>> Jan Schneider wrote:
>>>> Zitat von gimili <gimili17 at gmail.com>:
>>>>> Would it be possible to have a cron job that created the  
>>>>> thumbnails for a large gallery that was uploaded via web publish  
>>>>> or perhaps a button that ran a script?  This seems like it might  
>>>>> be simple and perhaps people would find it useful?  It is so  
>>>>> easy to get a large amount of photos into ansel via web publish  
>>>>> but then it was slow to move through the pages as I had to wait  
>>>>> for the thumbnails to be generated for the first time.  Once  
>>>>> they are generated it is almost instantaneous.  Not that big a  
>>>>> deal but just a thought.  This is a really great module!  Thanks!
>>>> Why would a cron job help in that case? You'd still have to wait,  
>>>> but this time for the cron job, not for the page to load.
>>> Quite true Jan.  I would have to wait but cron job happens without  
>>> me having to do anything.  Currently I have to move through each  
>>> page myself to force generation and this takes some time (perhaps  
>>> there is already a better way that I am not aware of?).  It took  
>>> 20 seconds per page with 2,400kb photos.  With cron I could upload  
>>> the large gallery (I still can't believe how well this works) and  
>>> know that in the evening the thumbnails would be generated so that  
>>> the next day my user, who always complains about speed, would not  
>>> have to wait as she switches from page to page in the gallery for  
>>> thumbnail generation.
>>
>> ...but then that means that "your user" would have to wait until  
>> the next day, after the cron job has run.
> I got that :-)
>>  There is also nothing preventing someone from visiting your  
>> gallery, thus generating the thumbnails anyway.
> The gallery is for one particular user who won't access them until I  
> email the link.  Therefore myself or the user will generate the  
> thumbs.  It won't be anybody else.
>
>> There is an option to auto-generate thumbnails on upload, but this  
>> is purposefully turned off for the xp publish feature to avoid  
>> overloading the server since there is no limit on the number of  
>> photos that can be uploaded at once via that method.
> That makes a lot of sense.
>> Image generation is fairly resource intensive, spreading it out in  
>> groups of 9 images (or whatever your images-per-page setting is)  
>> helps spread out the load.  That being said, 20 seconds seems a bit  
>> excessive, but that, of course, depends on lots of factors, server  
>> hardware/memory, image toolkit being used etc...
> Speed is only a problem when images are kept at high quality.  The  
> images are being used in print material and need to be at higher  
> than normal quality.
>>
>> Running a cron job isn't a horrible idea, but that comes with it's  
>> own set of performance issues since it would be checking every  
>> user's galleries for un-processed images and processing them and  
>> *that* would be seriously resource intensive for anything but the  
>> simplest installations...then there is the question of what style  
>> should the thumbnails be auto generated for....etc...
> I see.
>>
>>> There is already an option for auto-generation for pictures  
>>> uploaded via the ansel interface but this is not available for the  
>>> web publish option.  Maybe there is another way to trigger it  
>>> besides cron.  A button that generates all the thumbnails for the  
>>> gallery would help.
>> If your having so much issues with one page in your gallery, I'm  
>> not sure that generating an entire gallery's worth during a single  
>> request would be the answer. I'd be against this being available  
>> for all users since it has the potential to affect server  
>> performance.
> That makes sense.  I guess I will just click through all the pages  
> and generate the thumbnails.  Not the end of the world for sure.
> **Thanks again!  Great software**
>

As a quick workaround for your particular situation. If you only need  
thumbnails for the "default" ansel style (i.e. no fancy thumbnails)  
then an easy way to generate all of them would be to view the "Set  
Captions" page for the gallery. The link is in the Gallery Actions  
widget menu on the right hand side.  This page shows all the images in  
the gallery with a "normal" thumbnail so it will force the generation  
of those images.



Thanks,
mike

--
The Horde Project (www.horde.org)
mrubinsk at horde.org

"Time just hates me. That's why it made me an adult." - Josh Joplin


More information about the ansel mailing list