Ticket #67 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Create more reliable thumbnail refresh conditions

Reported by: mike Owned by: mike
Priority: normal Milestone:
Component: General Version: 1.0b2
Severity: normal Keywords:
Cc:

Description

The code currently in place which determines whether or not to regenerate the thumbnail is fairly cumbersome and does not cover all cases. This code checks dimensions of the thumbnail and compares is it to the config size, among other things. The code fails in the following ways: It will always regenerate thumbnails for the case when the original image is square. It cannot tell if you have changed the JPG compression settings and will not regenerate the thumbs unless you clear the cache or change the thumbnail size.

I propose a much simpler method to determine if a thumbnail needs to be regenerated. A simple timestamp on the config table which tells you when the config settings were last updated. Comparing this to the date modified on the thumbnail image can tell you if they need to be refreshed. Any better solutions?

Change History

Changed 3 years ago by mike

One problem with this method is that all the thumbnails will be refreshed if someone makes any minor change to the config table, changing the gallery title for example. Also, updating the compression should cause all thumbnails to regenerate, updating the large thumbnail size should cause only large thumbnails to generate, and updating small thumbnail size should cause only small thumbnails to update. So maybe the solution is to create two new config variables -- small_timestamp and large_timestamp. Updating the small thumbnail size will update small_timestamp, updating the large thumbnail size will update the large_timestamp, and updating the compression will update both timestamps.

Changed 3 years ago by anti

Here's an idea - let me know what you think of that: http://dev.plogger.org/wiki/ThumbnailGeneration

Changed 3 years ago by anti

  • status changed from new to closed
  • resolution set to fixed

Fixed in [207]

Note: See TracTickets for help on using tickets.