Closed kumarvikram closed 2 years ago
I had an issue with the hero image srcset, due to the wget -k command I was using to fetch the static site. I edited the hbs file such that the whole <img ... /> is in the same line. That fixed the issue. It may help
@abarajithan11 Thanks. Can you guide me on how to set the alt attribute dynamically on this image tag? I believe the alt attribute is getting saved with post but I am not sure how to retrieve it.
Is there any helper like img_url to read the alt attribute of the image?
I'm not sure about it. I haven't tried that
@kumarvikram You can use alt="{{alt_image}}"
I will fix this in a next update but for now you can add this code.
@eddiesigner Thanks but it is not working. Just rendering empty alt attribute.
@kumarvikram Sorry, the correct attribute is alt="{{feature_image_alt}}"
I will close this issue now since this was fixed in the latest version.
Even though I set the alt text on hero image while creating the post, it doesn't appear after publishing. It is always blank. Checked in hero.hbs of the theme and found it is not reading the alt value and setting it to empty always.
How to resolve this?
Images in article cards on home page have similar issue but I couldn't find the source of it. I am new to ghost and this ecosystem, so any help will be appreciated.