How do I use element instead of tags in WordPress post content having webP support?
You have to loop through all images inside $post the_content() using foreach(). Which gives us, regex for group matching of <img> tag. Put all images into array(). Start counting from -1 since 0 has the 1st image already in array(). Loop through array() with images, find image with “size-full” with group match 3, if yes, … Read more