Closed HunterCarrollBailey closed 4 weeks ago
I was able to resolve the issue by adding height and width to the Gallery Card component
<Image src={imagePath} alt={alt} class="gallery-img" height={100} width={100}/>
Thankfully I have images sized in my scss but there should be an update to the documentation examples that incorporates that information.
Closing as we have not had other problems with this recipe, and adding width and height should not be required in this situation. If there is an error, it may be an issue with Astro to fix or with local code, but the documentation is documenting the intended usage.
📚 Subject area/topic
Recipes
📋 Page(s) affected (or suggested, for new content)
Dynamically Import Images
📋 Description of content that is out-of-date or incorrect
Error The First
Dynamically importing issues following Dynamically Import Images results in a MissingImageDimensions error. I am using the same code as listed in the documentation, with a few small alterations as you can see below.
Gallery Component
Gallery Card Component
Error The Second
When using the suggestion of
inferSize={true}
the system pops up with a different error of FailedToFetchRemoteImageDimensionsGallery Card Component
🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)
No response