junaidbhura / fly-dynamic-image-resizer

Fly Dynamic Image Resizer plugin for WordPress
https://wordpress.org/plugins/fly-dynamic-image-resizer/
MIT License
162 stars 26 forks source link

First method, php echo, doesn't add "class"! #59

Open ersinco opened 1 year ago

ersinco commented 1 year ago

<?php echo fly_get_attachment_image( get_post_thumbnail_id(), 'test150', array('class' => 'app-image') ); ?>

It pulls the image with the ID "test150", but cannot pull the "class" attribute.

Unfortunately, I need to use the other method to add a class. Please allow adding class to first method.

<?php $imagept = fly_get_attachment_image_src( get_post_thumbnail_id(), 'test150' ); echo '<img src="' . $imagept['src'] . '" width="' . $imagept['width'] . '" height="' . $imagept['height'] . '" class="app-image" />'; ?>