I'm trying to add a CSS class to every image in a custom post type.
I've found this answer, to add a class to every image in general:
function add_image_class($class){ $class .= ' additional-class'; return $class; } add_filter('get_image_tag_class','add_image_class'); How would I build on this, so that it only applies to a custom post type?