Skip to content

Thumbnail management#436

Open
aliceif wants to merge 15 commits intofedify-dev:mainfrom
aliceif:thumbnail_management
Open

Thumbnail management#436
aliceif wants to merge 15 commits intofedify-dev:mainfrom
aliceif:thumbnail_management

Conversation

@aliceif
Copy link
Copy Markdown
Contributor

@aliceif aliceif commented Apr 19, 2026

I decided to implement a way to clean up old thumbnails from storage.

Idea here:

  • provide a cutoff date
  • only delete thumbnails of remote posts that have not been ...
    • bookmarked
    • liked
    • reacted to
    • shared
    • quoted
  • ... by any user on the server

This is being done in a new page in the admin area titled "Thumbnail Cleanup":
image

The media table entry stays intact, so that the information of media existing does not get lost. In addition, some clients seem to (be able to) ignore thumbnails.

I have already tested it with both a locally hosted testing environment and my productive instance, on which it let me reclaim over 3GB out of 10GB storage used according to minio.

Related issue: #409

@dahlia dahlia self-assigned this Apr 21, 2026
@dahlia dahlia added enhancement New feature or request labels Apr 21, 2026
@dahlia dahlia linked an issue Apr 21, 2026 that may be closed by this pull request
@dahlia dahlia modified the milestone: Hollo 0.8 Apr 21, 2026
Copy link
Copy Markdown
Member

@dahlia dahlia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks for your work! Since this is a new feature, could you change the target of this pull request to branch main instead of stable?

@aliceif aliceif changed the base branch from stable to main April 21, 2026 09:11
@aliceif aliceif force-pushed the thumbnail_management branch from dc1f74a to 5a06003 Compare April 21, 2026 21:53
@aliceif
Copy link
Copy Markdown
Contributor Author

aliceif commented Apr 21, 2026

and, after some effort, rebased onto main...

@aliceif aliceif requested a review from dahlia April 21, 2026 22:00
Copy link
Copy Markdown
Member

@dahlia dahlia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, thanks for your contribution! I left several review comments.

Also, could you add a changelog item to the CHANGES.md document?

Comment thread src/cleanup/processors.ts Outdated
Comment thread src/cleanup/processors.ts
Comment thread src/pages/thumbnail_cleanup.tsx
Comment thread src/cleanup/worker.ts Outdated
Comment thread src/pages/thumbnail_cleanup.tsx Outdated
Comment thread src/pages/thumbnail_cleanup.tsx Outdated
Comment thread src/components/DashboardLayout.tsx Outdated
Comment thread src/pages/thumbnail_cleanup.tsx Outdated
@aliceif aliceif requested a review from dahlia April 22, 2026 06:51
use slicing logic to extract key
use round-tripping characteristic to validate url
@aliceif aliceif force-pushed the thumbnail_management branch from 5f288cb to a21a750 Compare April 22, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to clear the cache?

2 participants