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

SVG support for django-filer #1226

Merged
merged 64 commits into from
Feb 1, 2021
Merged

SVG support for django-filer #1226

merged 64 commits into from
Feb 1, 2021

Conversation

jrief
Copy link
Collaborator

@jrief jrief commented Nov 24, 2020

This pull request adds a feature many users are waiting for: Uploaded images can now also be in SVG.
The heavy lifting of cropping and scaling SVG images is done inside easy-thumbnails (you need version 2.8rc0 or later).

Changes:

  • Drop support for high resolution images and remove retina.js from project. High resolution images now are handled by the attribute in <img srcset="..." ... /> – as the HTML standard requires.
  • _width and _height in model Image changed to FloatFields, this because SVG images specify their size as floats.
  • For local development switched to NodeJS version 14. See also PR Upgrade to work with NodeJS version 14 #1224
  • Add templatetag file_icon to file_admin_tags. It handles the rendering of all file types.
  • Remove pre-thumbnailing of images. Up to now, after upload images were scaled into many different sizes, most of which never were used. Now thumbnailing for rendering images in the admin is lazy.
  • All icons for displaying folders, files (not images) have been replaced by nicer looking SVG variants.
  • Increase size of thumbnails in list view from 25x25 to 40x40 pixels.
  • Added a playing facility for uploaded audio and video files.
  • Fix scaling of very wide but short images – causing a division by zero exception: ceil height to integer.
  • Add method exists() to MultiStorageFieldFile, which checks if a file exists on disk.
  • Drop support of Python-3.5. Reason: Third party requirement reportlabs requires Python>=3.6.

I would propose version number 2.2 for the upcoming release containing these changes.

# Conflicts:
#	gulpfile.js
#	package.json
filer/models/abstract.py Outdated Show resolved Hide resolved
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.

3 participants