buster808 Posted October 3, 2019 Posted October 3, 2019 Hi I cant get alt tags to work with image description. $content .= "<a href='$large->url' class='thumb-roll'> <img src='$thumb->url' alt='$image->description' /></a>"; Thanks for any help.
wbmnfktr Posted October 3, 2019 Posted October 3, 2019 $content .= "<a href='$large->url' class='thumb-roll'> <img src='$thumb->url' alt='$image->description' /></a>"; How does your code before that part looks like? I guess you already tried $large->description and $thumb->description. Correct? Are descriptions set?
buster808 Posted October 3, 2019 Author Posted October 3, 2019 The thumbnails alt tag is working fine now but how would I set the large image alt that it links too foreach ($page->images as $image) { $large = $image->width(1000); $thumb = $image->size(400, 400); $content .= "<a href='$large->url' class='thumb-roll'> <img src='$thumb->url' alt='$thumb->description' /></a>"; }
wbmnfktr Posted October 3, 2019 Posted October 3, 2019 You wouldn't. Just use $image->description as it's the actual image which has a description. Your thumb and large variations or just that. Variations of the original image. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now