Ticket #191 (accepted enhancement)

Opened 3 months ago

Last modified 3 months ago

Create corresponding folder paths in thumbs/ folder

Reported by: sidtheduck Owned by: sidtheduck
Priority: high Milestone: 1.1
Component: General Version:
Severity: normal Keywords:
Cc:

Description

Per this discussion ( http://www.plogger.org/forum/discussion/2121/2-things-importing-and-security/#Item_13 ) we may run into issues with users with large galleries.

Currently, all the thumbnails are stored directly within the thumbs folder. If a user has more than the limited amount of images, the thumbs folder will be over capacity where each individual album would be fine within itself.

We should set up relative paths to fix this. We could either set up a corresponding path and place all thumbnails (small, large, and RSS) within that folder (i.e. /thumbs/collection/gallery/ ) which may still limit users a maximum of 1/3 the image amount per album. Or we could set up different corresponding paths for each type of thumbnail (i.e. /thumbs/small/collection/gallery + /thumbs/large/collection/gallery + thumbs/rss/collection/gallery) which would allow the maximum amount of images for each album.

What are others thoughts for the structure of this?

Change History

  Changed 3 months ago by kimparsell

I agree that this needs to be changed. To allow the gallery to scale well for users with a large number of images, I think we need to take it to the maximum level now, rather than have to change it to this structure later on:

/thumbs/small/collection/gallery
/thumbs/large/collection/gallery
/thumbs/rss/collection/gallery

follow-up: ↓ 4   Changed 3 months ago by kimparsell

Another thought, actually a question(s): This structure will work well for new users, but how will we incorporate this change in the structure of the thumbnail folder for users that are upgrading from version 2/3.0 or the current restructured version? Will they be required to manually move/sort their thumbnails during the upgrade process, or can we automate this somehow?

  Changed 3 months ago by ryanduff

The other way to lay this out would be:

/thumbs/collection/gallery/small
/thumbs/collection/gallery/large
/thumbs/collection/gallery/rss

This takes care of thumbnails being the problem.

The second part would be to do an image count per gallery and break into a new folder at 1200 images. (Maybe allow a smaller number as an option?). Every time an album hits a multiple of the limit, it would create a new directory and append _x (Starting with 2 for the second folder and increasing). I don't see this being a problem for most people, but it should probably be implemented somewhere down the road.

Example: Album1 has 500 images, Album2 has 1500 images, and Album3 has 2500 images.

/images/album1 (500 images)
/images/album2 (1200 images [1-1200])
/images/album2_2 (300 images [1201-1500])
/images/album3 (1200 images [1-1200])
/images/album3_2 (1200 images [1201-2400])
/images/album3_3 (100 images [2401-2500])

in reply to: ↑ 2   Changed 3 months ago by ryanduff

Replying to kimparsell:

Will they be required to manually move/sort their thumbnails during the upgrade process, or can we automate this somehow?

If it's implemented post 1.0, users will already have images in the correct folder locations. We can just use the move code to loop through the folder, generate the 3 required folders and move the thumbnails into the respective folder.

  Changed 3 months ago by sidtheduck

Whichever way we do it, the thumbnails will be updated automatically (since the thumbnails are all called using generate_thumb() function). It will automatically create all the folders and thumbnails if it can't find them along the thumbnail path (which is all part of the generate_thumb function). It just means that there may be some doubles, both the old path and the new path. We can just have people clear out the thumbs/ folder during upgrade and let the generate_thumb() function do it's job and recreate all the thumbs again.

Regarding paths, I think I may like Ryan's suggestion better:

/thumbs/collection/album/small/
/thumbs/collection/album/large/
/thumbs/collection/album/rss/

since it would be easier to move or erase an entire thumbs folder if the album is moved or deleted.

Now all we have to think about is how to store the uploads and themes thumbnails. Should it be: /thumbs/plog-uploads/ /thumbs/plog-themes/ Or something like that? Thoughts?

  Changed 3 months ago by ryanduff

Lets open a ticket for the themes thumbnails to change the code. One thumbnail.jpg/gif/png within the theme directory. Specify a large size (to be used for full screen preview) and just constrain that file for the theme list tab.

Import can use a file /thumbs/plog-uploads that is cleared at the end of the import. When the import page is called and it sees photos within plog-upload, thumbnails are created within /thumbs/plog-uploads/ so they can be viewed pre-import. Once the user imports those pictures, they are cleared from the /thumbs/plog-upload at the end of the import. Better yet, they could be moved to the corresponding /thumbs/album/ folder so they don't need to be regenerated.

  Changed 3 months ago by sidtheduck

  • priority changed from normal to high

  Changed 3 months ago by sidtheduck

  • owner changed from mike to sidtheduck
  • status changed from new to accepted
Note: See TracTickets for help on using tickets.