The function get_post_type returns the type of the current post, so supposing you want to add this class only to a post type called 'wpse' you should include a conditional like this:
function add_image_classwpse237573_add_image_class($class){ if ('wpse' == get_post_type()) $class .= ' additional-class'; return $class; } add_filter('get_image_tag_class','add_image_class''wpse237573_add_image_class');