If you have a CyberSEO Pro license (since you are a GFY member, I assume you have it

) then you already have all the tools you need. Here we go:
1) If you want to automatically convert images in new posts, just put the following code into the
Expert -> Custom PHP code box in your feed settings:
Code:
if (!cseo_post_exists($post)) {
preg_match_all('/<img.+?src=["\'](.+?)["\'].*?>/is', $post['post_content'] . $post['post_excerpt'], $matches);
if (isset($matches[1])) {
foreach ($matches[1] as $link) {
cseo_store_image($link, $post['post_title'], -1, -1, -1, IMAGETYPE_WEBP);
}
}
} else {
$post = false;
}
Now the plugin will automatically convert post images into the WEBP format.
2) If you want to do the same trick with images in already existing posts, click
Post Modification Tools, put the following code into the box and execute it:
Code:
preg_match_all('/<img.+?src=["\'](.+?)["\'].*?>/is', $post->post_content . $post->post_excerpt, $matches);
if (isset($matches[1])) {
foreach ($matches[1] as $link) {
$new_link = cseo_save_image($link, $post->post_title, -1, -1, -1, IMAGETYPE_WEBP);
if ($new_link != $link) {
$post->post_content = str_replace($link, $new_link, $post->post_content);
$post->post_excerpt = str_replace($link, $new_link, $post->post_excerpt);
cseo_delete_media_by_url(array($link));
}
}
}
Vualá! All your WordPress post images now converted into WEBM
If you want to convert your images into a different format, simply replace IMAGETYPE_WEBP with the appropriate value, e.g.: IMAGETYPE_JPEG, IMAGETYPE_PNG etc. Find more examples for
Modification Tools here:
https://www.cyberseo.net/modification-tools/#examples
P.S. Make sure you are using the most recent version of CyberSEO Pro, which is
9.016 ATM.