question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some images not showing up (due to zero height)

See original GitHub issue

Reported 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:

nan

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:closed
  • Created 7 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
anandaroopcommented, Feb 21, 2017

Yep, I will be following up on the deploy and migration today.

0reactions
anandaroopcommented, Feb 27, 2017

Resolved via this migration

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found