Add double-density support to photo thumbnails #28

Merged
Aaron merged 13 commits from improve_thumbs into master 2022-11-27 14:38:22 +01:00
Member

This PR introduces double-density thumbnails to album indices and photo pages. Part of the thumbnail generation code has been refactored for readability as well.

This PR introduces double-density thumbnails to album indices and photo pages. Part of the thumbnail generation code has been refactored for readability as well.
Aaron added 11 commits 2022-07-08 23:51:29 +02:00
58b7204fbf Do not delete thumbnail queue when replacing an asset
Thumbnails are normally created on demand, e.g. when processing the format codes in a post's body text.
Normally, the temporary URL is only used once to generate thumbnails ad-hoc. However, when cache is
enabled, a reference to the asset may be used in a cached version of a formatted body text, skipping
the normal thumbnail generation routine.

When an asset is replaced, currently, all thumbnails are removed and references to them are removed
from the database. In case the asset is still referenced in a cached formatted body text, this could lead
to an error when requesting the thumbnail, as the thumbnail request is no longer present in the system.

As we do not know what posts use particular assets at this point in the code, it is best to work around this
issue by unsetting the thumbnail filenames rather than deleting the entries outright. This effectively
generates them again on the next request.

In the future, we should aim to keep track of what posts make use of assets, so cache may be invalidated
in a more targeted way.
Aaron added 2 commits 2022-07-14 16:40:37 +02:00
Aaron force-pushed improve_thumbs from 187a7cd02f to 3de87809bb 2022-11-27 14:36:32 +01:00 Compare
Aaron merged commit d66f071aab into master 2022-11-27 14:38:22 +01:00
Aaron deleted branch improve_thumbs 2022-11-27 14:38:23 +01:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Public/pics#28
No description provided.