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 PNG assumption in AtomArticleBlocks #3932

Merged
merged 1 commit into from
Sep 6, 2024
Merged

Conversation

ikesau
Copy link
Member

@ikesau ikesau commented Sep 6, 2024

Today, a data insight was published using JPEGs instead of PNGs which exposed a buggy assumption we were making when rendering the data insight atom feed.

This PR fixes that assumption by making sure we only assume the extension is a PNG when we're rendering a resized version of the image. (See this resize code for context)

In a followup PR we should make sure authors only use PNGs for data insights because JPEGs aren't the best format for data viz graphics, and converting them to PNG in the resize process adds artifacts

Screenshot 2024-09-06 at 11 49 53
From this image

@ikesau ikesau requested a review from rakyi September 6, 2024 15:50
@owidbot
Copy link
Contributor

owidbot commented Sep 6, 2024

Quick links (staging server):

Site Admin Wizard

Login: ssh owid@staging-site-fix-data-insight-images

SVG tester:

Number of differences (default views): 0 ✅
Number of differences (all views): 0 ✅

Edited: 2024-09-06 15:59:42 UTC
Execution time: 1.21 seconds

@ikesau ikesau merged commit 97b107b into master Sep 6, 2024
27 checks passed
@ikesau ikesau deleted the fix-data-insight-images branch September 6, 2024 16:56
@rakyi
Copy link
Contributor

rakyi commented Sep 9, 2024

Thanks for the fix!

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