django-cms / djangocms-frontend

django CMS frontend is a plugin bundle for django CMS providing several components for the frontend, currently implemented with the popular Bootstrap 5 framework.
Other
55 stars 21 forks source link

fix: Keep aspect ratio of uploaded images if only one of `width` or `height` is set. #150

Closed fsbraun closed 1 year ago

fsbraun commented 1 year ago

This fixes an issue that leads to ~2.6 times too low resolutions for portrait images that have a fixed height or width (but not both).

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 33.33% and no project coverage change.

Comparison is base (e5c459c) 86.81% compared to head (b5c29af) 86.81%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #150 +/- ## ======================================= Coverage 86.81% 86.81% ======================================= Files 119 119 Lines 3087 3088 +1 Branches 329 329 ======================================= + Hits 2680 2681 +1 Misses 300 300 Partials 107 107 ``` | [Files Changed](https://app.codecov.io/gh/django-cms/djangocms-frontend/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=django-cms) | Coverage Δ | | |---|---|---| | [djangocms\_frontend/contrib/image/models.py](https://app.codecov.io/gh/django-cms/djangocms-frontend/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=django-cms#diff-ZGphbmdvY21zX2Zyb250ZW5kL2NvbnRyaWIvaW1hZ2UvbW9kZWxzLnB5) | `67.39% <33.33%> (+0.35%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.