Hi there,
sure, there are several ways to add classes to your featured images.
1) Use wp_get_attached_image
You could get the id of your featured image for using it in the WordPress function wp_get_attached_image.
$myId = kdmfi_get_featured_image_id( 'featured-image-2' );
echo wp_get_attached_image($myId, 'full', false, ['class' => 'my-class']);
2) Shortcode
You could use the shortcode.
Shortcode usage:
[kdmfi_featured_image id=”featured-image-2″ size=”full” class=”your-class”]
Possible attributes for the shortcode:
id: the id of the featured image, e.g. featured-image-2, requried
size: the desired size, defaults to “full”
post_id: the ID of the post to which the featured image is assigned, defaults to the current ID
class: the classes for the image tag, defaults to “kdmfi-featured-image”
alt: the alt attribute for the image tag, defaults to the title of the used image
title: the title attribute for the image tag, empty by default
Regards,
Marcus