Add custom attribute to image using the_post_thumbnail

Please visit Source Site
From: wpsnipp.com
By: Kevin ChardSometimes you will need to add a custom attribute to an image. This is very easy to do using the_post_thumbnail() function. The following snippet will add the custom attribute of ‘itemprop=”image” to your images but you can change that to nearly anything including class, alt, title etc.link: Add custom attribute to image using the_post_thumbnail
“Add custom attribute to image using the_post_thumbnail is a post from: wpsnipp.com – WordPress Snippets, Code, Hacks, 615+ for your wordpress theme or blog.

Please visit Source Site