There is a file called api.php, you can call those functions 🙂 But do you really need to call the functions? What is your shortcode doing?
The shortcode is simply echoing an image with a given id and adding some attributes. Instead of importing img thru the add media button, I prefer to have a shortcode and call certain images by id. Then I pass attributes to add wraps, class, link etc. So the shortcode generates either
or ![]()
Hope I explained it well.
In this case, that will be handled automatically by WP Retina 2x. Your images will go through the standard Responsive functions of WordPress in which my plugin hooks itself. Check the “new functions”: https://make.ww.wp.xz.cn/core/2015/11/10/responsive-images-in-wordpress-4-4/. If your image generated by your shortcode doesn’t go through those functions, there is a problem 🙂
Thanks a lot, Jordy.
I wasn’t aware of that new feature in WordPress.