Some images not showing up (due to zero height)
See original GitHub issueReported on Slack: https://artsy.slack.com/archives/partner-s-help/p1487119184004472
Some images in this partner show are not being rendered in the artwork grid layout:
It appears that there is a ViewHelper which tries to calculate some optimal layout settings based on an image’s width
and height
as returned by Metaphysics
BUT… sometimes Metaphysics doesn’t return the height/width metadata for an image, as shown by these console.logs (note the nulls
)… which results in a div by zero / NaN value being passed to the template.
2:23:18 PM web.1 | { url: 'https://d32dm0rphc51dk.cloudfront.net/DwdY0-ehhWXGL-9-yTospw/large.jpg',
2:23:18 PM web.1 | width: 3960,
2:23:18 PM web.1 | height: 5026 }
2:23:18 PM web.1 | { url: 'https://d32dm0rphc51dk.cloudfront.net/ysM4y7vfaPDBzQpitRJR0Q/large.jpg',
2:23:18 PM web.1 | width: null,
2:23:18 PM web.1 | height: null }
2:23:18 PM web.1 | { url: 'https://d32dm0rphc51dk.cloudfront.net/cG-FFMpEWY9wbnH5cE7BvA/large.jpg',
2:23:18 PM web.1 | width: null,
2:23:18 PM web.1 | height: null }
2:23:18 PM web.1 | { url: 'https://d32dm0rphc51dk.cloudfront.net/J_NOHi4zf-_4jxyd1zVzGw/large.jpg',
2:23:18 PM web.1 | width: 900,
2:23:18 PM web.1 | height: 428 }
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Uploaded images can't be displayed in original size
Images uploaded in the content block wysiwyg editor does not appear in 100% (original size) they are force scaled to set positions that...
Read more >Images have height: 0 in Chrome but not Firefox
Chrome looks to the container and sees no height, then calculates the height of the children to 100% of 0. Hence the container...
Read more >Setting Height And Width On Images Is Important Again
Yes, when an image is being shown at full size, without any CSS changing any dimensions, it is useful to resolve the layout...
Read more >zero height(1px) image(GIF) problem with lazyLoad ... - GitHub
When I turn on the both lazyLoad and adaptiveHeight options, sometimes the image(GIF) has 1px height. Then, I click somewhere in carousel ...
Read more >How to fix CSS background-image not working | HTML/CSS
3. Explicitly set the element's width and/or height. ... If the image isn't showing up, but you aren't getting any 404 errors, go...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep, I will be following up on the deploy and migration today.
Resolved via this migration