Is there a way to pass in a CSS class and alt text in an image in a view

By: Naomi Spirit | Asked: 12/13/2023
ForumsCategory: General questionsIs there a way to pass in a CSS class and alt text in an image in a view
Naomi SpiritNaomi Spirit asked 8 months ago
I'd like to add CSS class and alt text to an image I'm using in a view.   Here's what Im currently using
[19 show_image=1 size=ful][/if 19]
Something like this would be ideal:
[19 show_image=1 size=full css='img-responsive' alt='some alt text'][/if 19]
Is this possible?  Im guessing I need to instead write out HTML but this is tricky without the image URL which I also cant seem to see there?
1 Answers
Naomi SpiritNaomi Spirit answered 8 months ago
This does it ok   <img src="[9 size=medium ]" alt="[15]" />

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right