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.

Image elements returns "skipped due to invalid dimensions"

See original GitHub issue

Describe the bug Image component seems to be broken. I tried many ways to render image in pdf but it always returns “Image with src […] skipped due to invalid dimensions”. Even if I used an image from examples folder https://blog.oxforddictionaries.com/wp-content/uploads/mountain-names.jpg. I tried local files, base64, external files. Did I do something wrong?

To Reproduce Here is a codesandbox with simplest example: https://codesandbox.io/s/yjpk4nkk61

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
aexolcommented, Nov 5, 2019

Old issue,but 😃 ,

<View style={{flexDirection:'row'}}>
  <View style={{flex:1}}>
      <Image
        style={{
          width:'auto'}}
        src="/static/images/quijote1.jpg"
      />
  </View>
  <View style={{flex:1}}>
      <Image
        style={{
          width:'auto'}}
        src="/static/images/quijote1.jpg"
      />
  </View>
</View>

works. Just set width:‘auto’ on image as its not default here @diegomura

3reactions
0FilipKcommented, Apr 3, 2019

I figured it out. It was caused by StyleSheet style but this error is misleading as hell. Just removed flexDirection and flexGrow and now it’s works as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"One or more dimension references are or have become ...
One or more dimension references are or have become invalid. User-added image. Causes: Revit is not able to find the geometry that the...
Read more >
Invalid image dimensions in includes/image.inc on line 238
Go to admin/settings/image and check that the settings under "Image sizes" are not duplicated. In my case the "Original" size was duplicated. I ......
Read more >
"Invalid dimensions for image data" error when creating a ...
Closed 4 years ago. I keep receiving: TypeError: Invalid dimensions for image data. with a blank graph that has axis going from 0.0...
Read more >
<img>: The Image Embed element - HTML - MDN Web Docs
The image is invalid or an unsupported type. In these cases, the browser may replace the image with the text in the element's...
Read more >
How to fix: Invalid image - Google Merchant Center Help
Ensure the image is accessible and uses an accepted image format (JPEG , WebP, PNG, GIF, BMP, and TIFF)The URL provided for either...
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