I explain my wish.
When I upload some photos, I resize them before because I know that a 2048x1024 pic take 1Mo on my server ! But, on my website, a lot of people add new pics and they can't or they don't know how to resize before so I have some bigs photos on my gallery.
That I want to do is delete original file after resizing it and keep only ".thumbnail" and ".size" photo. Is it possible ? Easily ? I think it could be an option in setup.
Thanks for answer.
Posts: 22
Hi,
That feature is not currently implemented, but...
You can remove the click through to the huge image link by editting view_photo.php...
around line 393 change:
if ($gallery->album->isResized($index) && !$do_fullOnly) {
to:
if (false) {
That will stop the image from being a link, then you can do like I do..
copy the *sized* images over your main images.
Also, as an alternative to that, a patch is available for <!-- BBCode Start --><A HREF="http://sourceforge.net/tracker/index.php?func=detail&aid=577284&group_id=7130&atid=307130" TARGET="_blank">download here</A><!-- BBCode End --> that requires a config addtion by you:
$gallery->app->showFull = "no";
and downloading a replacement view_photo.php.
Hope this helps
Posts: 7
Thanks for answer.
In fact, I have done some modifications before you send your message and I have disabled FULL view (and if you click on the pic, you return to the thumbnail of the album).
But after if I remove manually the huge original files, it appears some problems : highlight photo is made with it so you have a wonderful black pic, you have errors with properties,... Moreover, manually delete is not a solution very proper !...
I'll try to implement this and I'll post my contribution (if I find a solution !...)
I you have more informations...
Posts: 22
I can only suggest copying the *sized* images over your main images...
A truly working solution would make for a nice hack for someone to do!
:grin:
Posts: 7
I have an idea...
Do you think it's possible to delete "full file" and to create a symbolic link from the existing ".sized file" with the name of the "full file". Am I clear ?...
I'm going to test this...
Posts: 487
Alternatively, you could set things up so that after Gallery resizes the image
it will copy it over the original full image then delete the sized image. Then
adjust your configuration to bypass the sized images and go straight to the
already resized 'full' image. I can't imagine this would take more then a
few minutes work.
Posts: 3
This is exactly what I am looking for!!! Has anyone submitted a mod for this or will this be a feature of G2???
Since I know very little about php coding ... minutes would last for weeks! :grin:
- cheers
kv
Posts: 2
Well, i tried all of this and didn't get it to work in gallery 1.5 pl1... so here's a real quick fix...
edit view_photo.php
find the line with $href= makeAlbumUrl($gallery->session->albumName, $id, array("full" => 1));
this was line 568 for me.
just change the 1 to a 0.
$href= makeAlbumUrl($gallery->session->albumName, $id, array("full" => 0));
The link will just open the same image. Then you can delete all the large images from album folders...
Devin
Posts: 27300
G2 offers quotas and size limits. As for G1 you can try a search for "myresize" and you will be able to resize the images on the server.
Dave
Gallery Frames / Mods || G1 Test Gallery