statamic-responsive-images: Alt text not being pulled from Statamic Asset Manager

I’m using this …

{{ responsive:image alt="{ alt }" }}

Trying to pull in the alt text entered in the asset itself, but it ain’t working. Am I doing something wrong, or is this just not what the Responsive Images addon does?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (3 by maintainers)

Most upvoted comments

Please open a new one, if you could add a failing test or a small repo with a test app so I can easily reproduce it that would help a lot as well

Just like to give this another bump. Here’s another hacky solution I had to come up with that only works for pages with a single image. I set a bunch of fallbacks on the alt tag.

{{ responsive:banner_image ratio="1" sm:ratio="1.5" lg:ratio="1.75" 2xl:ratio="2.25" class="object-cover object-top w-full" alt="{{ banner_image:alt ?? banner_image_seo:alt ?? seo:title }}" }}