How can I filter image HTML to add schema.org attributes?

works_secondary-image_thumbnail_html is not a WordPress core hook, so your code never executes. As long as images are displayed on your site by calling wp_get_attachment_image in your theme, you can add to the attributes by hooking into wp_get_attachment_image_attributes: add_filter( ‘wp_get_attachment_image_attributes’, ‘wpse_235266_image_attributes’, 10, 3 ); function wpse_235266_image_attributes( $attr, $attachment, $size ) { $attr[‘itemprop’] = ‘image’; return $attr; … Read more

Background-image not showing? [closed]

We lack context, but remember that CSS files are read from top to bottom, the lower definitions having priority over the top ones. The same logic applies within the file. That is why the !important attribute is used for. That being said, in your case you could have A caching plugin that loads a cached … Read more

Resize images in existing posts

So when you regenerated the thumbnails, did you use a plugin like: WordPress Regenerate Thumbnails plugin. Or did you make them in some other fashion? I’ve used this plugin before and it seemed to work for me. Another possible way to do this is with making a style modification in your style.css file. You can … Read more