Wordpress Theme Images Not being Optimized
pauloshea42 opened this issue · 3 comments
I'm noticing that some of my images are not being picked up by the script, seems to only impact images being served out of the themes directory rather than the uploads directory on my WP install. Any suggestions gratefully received.
An example is mission-bg.png on site https://kumoco.com
Config:
define('CF_IMAGE_RESIZING_SITE_URL', 'https://kumoco.com');
define('CF_IMAGE_RESIZING_SITE_FOLDER', '');
define('CF_IMAGE_RESIZING_HOME_DIR', 'ABSPATHi');
define('CF_IMAGE_RESIZING_HOOK_1', TRUE);
define('CF_IMAGE_RESIZING_HOOK_2', TRUE);
define('CF_IMAGE_RESIZING_HOOK_3', TRUE);
define('CF_IMAGE_RESIZING_HOOK_4', FALSE);
define('CF_IMAGE_RESIZING_HOOK_5', TRUE);
define('CF_IMAGE_RESIZING_HOOK_6', TRUE);
define('CF_IMAGE_RESIZING_FIT', 'crop');
define('CF_IMAGE_RESIZING_QUALITY', 80);
define('CF_IMAGE_RESIZING_FORMAT', 'auto');
define('CF_IMAGE_RESIZING_ONERROR', 'redirect');
define('CF_IMAGE_RESIZING_METADATA', 'none');
define('CF_IMAGE_RESIZING_STRIP_SIZES', TRUE);
define('CF_IMAGE_RESIZING_ADD_MISSING_SIZES', TRUE);
define('CF_IMAGE_RESIZING_FIX_VC_COMPOSER', FALSE);
define('CF_IMAGE_RESIZING_WHITELIST', FALSE);
define('CF_IMAGE_RESIZING_WHITELIST_URLS', [ 'fbcdn.net', 'twimg.com', 'cdninstagram.com', 'paypalobjects.com' ]);
Thanks for creating these scripts, finding them very useful.
This is because the plugin is written to work by default WordPress images path. I will investigate if anything can be done.
Hello, I am closing this issue since I have finally finished the Cloudflare Worker alternative. It's much more advanced and does not have this issue.
Please read my article on how to use and get the code: https://mecanik.dev/en/posts/cloudflare-image-resizing-for-wordpress/