Fix the issue where zooming does not work properly for .GIFs with transparent background. Here is the example on staging OSF. This bug only affects non-exported types: .GIF and .ICO. For exported ones, the export type .JPEG does not have transparency so the background is set to white by default.
Normal
Zoom - Before
Changes
The fix simply set a white background when the zoom image's style class is generated on the page.
Zoom - After
Side effects
No
QA Notes
Test that image rendering and zooming works as expected.
Coverage remained the same at 71.117% when pulling 4ba1f1a447fe915bedd3253968994d7c8abc43a5 on cslzchen:hotfix/image-zoom-gif into ead3389dd0363333778ab53fc2c64211a141c90c on CenterForOpenScience:develop.
Ticket
https://openscience.atlassian.net/browse/SVCS-918
Purpose
cc and h/t @Johnetordoff for discovering this
Fix the issue where zooming does not work properly for
.GIF
s with transparent background. Here is the example onstaging
OSF. This bug only affects non-exported types:.GIF
and.ICO
. For exported ones, the export type.JPEG
does not have transparency so the background is set to white by default.Normal
Zoom - Before
Changes
Zoom - After
Side effects
No
QA Notes
Test that image rendering and zooming works as expected.
.GIF
with transparent background: https://staging.osf.io/3ca45/.GIF
with non-transparent background: https://staging.osf.io/3r9m7/Deployment Notes
No