Plugin Author
satrya
(@satrya)
I’m using the standard get_the_post_thumbnail() function actually, it should work out of the box.
Hi there Satrya, thanks for replying and sorry for my delay in getting back to you!
In includes/functions.php the plugin uses get_the_post_thumbnail() once, but this seems to only apply in some circumstances (related to use of the custom function rpwe_resize()). There is alternative code (line 131 of functions.php in the latest version of the plugin) which creates an <img> tag directly when rpwe_resize() returns something – which in my case, it is.
I was able to get around this by wrapping line 131 in an apply_filters() call to post_thumbnail_html, sending through additional arguments get_the_ID(), $thumb_id and "thumbnail".
I’m not a plugin developer so I’m not sure if I have followed best practice for this but it is working for my needs at the moment – until I update the plugin of course 😉
I’m not sure if I’ve missed something or am understanding it incorrectly but if it is possible for you to filter that output where you’re creating the <img> tag I would be really appreciative!