Skip to content

Thumbnail management#436

Merged
dahlia merged 16 commits intofedify-dev:mainfrom
aliceif:thumbnail_management
Apr 23, 2026
Merged

Thumbnail management#436
dahlia merged 16 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 Outdated
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
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.

Few more points!

Comment thread src/pages/thumbnail_cleanup.tsx Outdated
Comment thread src/pages/thumbnail_cleanup.tsx Outdated
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.

Thanks very much for your great work. It will be shipped with the next release, Hollo 0.8.0!

@dahlia dahlia merged commit d509011 into fedify-dev:main Apr 23, 2026
2 checks passed
@dahlia dahlia mentioned this pull request Apr 23, 2026
@aliceif aliceif deleted the thumbnail_management branch April 23, 2026 08:38
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