Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Reduce number of thumbnails created for admin, avoid admin thumbnails for svg files #1490

Merged
merged 24 commits into from
Aug 22, 2024

Conversation

fsbraun
Copy link
Sponsor Member

@fsbraun fsbraun commented Aug 20, 2024

Description

Over the years, several thumbnail file sizes for the filer admin have accumulated:

  • 16x16, 32x32, 64x64
  • 40x40/80x80 (current table listing)
  • 75x75 for detail views
  • 160x160 (current icon listing)
  • 180x180 formerly used in the admin widget

This PR reduces the thumbnail sizes to two

  • FILER_TABLE_ICON_SIZE = 40 for table listings plus twice the value for detail views
  • FILER_THUMBNAIL_ICON_SIZE = 120 for the thumbnail view

No thumbnails are generated for SVG files shown in the admin.

This PR fixes #1489 and reduces the amount of storage used up for thumbnails used by the filer admin interface.

Currently, the icon sizes are also hard-coded into the css. The next step will be to make them html attributes and have dynamic css that adjusts to the attributes.

Related resources

Checklist

  • I have opened this pull request against master
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined #workgroup-pr-review on
    Slack to find a “pr review buddy” who is going to review my pull request.

@fsbraun fsbraun marked this pull request as ready for review August 21, 2024 05:45
Copy link
Member

@vinitkumar vinitkumar left a comment

Choose a reason for hiding this comment

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

Just one minor feedback. Otherwise, this looks excellent. Great work as always @fsbraun :)

@vinitkumar vinitkumar merged commit f919cbf into django-cms:master Aug 22, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uploading bigger SVG files blocks the UI
2 participants