Images won't render
Closed this issue · 3 comments
daniellefricke commented
Hi James,
I'm trying to get a main image for each blog to load onto my blog index page but its not working. Here is the code I've used.
<img src={blog.mainImage} alt="{blog.title}"/>
Any ideas as to why this wouldn't work? Thanks!
superbuggy commented
I would remove the quotes around {blog.title}
. Maybe blog
isn't defined, or mainImage
is undefined. What errors are you getting?
daniellefricke commented
I have 'mainImage' as a key in my seeds/schema and can see it in each object when I console log the index. in the alt, it is requiring "" and I'm not getting any errors.
superbuggy commented
This seemed like it was due to flickr's outside image linking policy. Reopen if necessary!