Draft: Set logo height if landscape format
What does this MR do and why?
Checks the format of the uploaded logo and sets the height if logo has a landscape format otherwise sets the width.
It uses mini-magick gem (already installed), which depend on ImageMagick or GraphicsMagick command-line tool to be available.
Alternatives:
- Use FastImage gem instead of ImageMagick, as suggested here.
- Check the landscape/portrait format when the logo is uploaded and save it into the database.
- Use JavaScript to detect landscape/portrait format and set the correct CSS.
I lean towards the last option.
Concerns:
With the solution in this MR and the first alternative, although small, the server has to make an extra computation on every login page served, which could impact negatively on the performance.
Closes #378719 (closed)
Screenshots or screen recordings
Before | After | |
---|---|---|
Rectangular logo | ||
Default (or square/circular) logo |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Eduardo Sanz García