Rewrite inline image markup
Most of the code is taken from Core files, also you might have to modify it a bit as per your own requirement. Here is the core file link, where I got the idea from: https://developer.wordpress.org/reference/functions/wp_make_content_images_responsive/ You need to take care of the open p tag just before the image. Was in hurry, so instead … Read more