Hi Jean!
Php 7+ is throwing a notice:
PHP Notice: Undefined offset: 0 in /path/to/wp-content/plugins/base64-images-modified/classes/class-base-64-images.php on line 246
Here:
//get background-image from style
$tags = $doc->getElementsByTagName('div');
foreach ($tags as $tag) {
$style = $tag->getAttribute('style');
preg_match('/\(([^)]+)\)/', $style, $match);
$src = trim($match['0'], "'()\"");// <---['0'] unidefined
$content = $this->change_source($src, $content);
Just thought that you should know.
Cheers and thanks!
-Brian
Hi this plugin is a good idea. I have page that has little post content but many widgets with a lot of small pictures. The plugin only process images from posts, so I decided to make it more generally. I created action for when page rendered, it call function: the_content() then it process img/src and element/style/background-image tags from all over the page. Also I use some cacheing (wordpress object cache), it could work fast when eg. memcache is turned on for object cache. Actually I use this plugin with wp-rocket and page cache, so conversion only happens when page is cached, so I got very good result combining them. (I guess it could work with other page caching like W3 Total cache also but its untested) Please feel free to use my modifications.
Download here: https://drive.google.com/open?id=1aXVqGShV6ThoYhsCQMzDqSDyqvoyFvsH
Best regards
]]>i tried the plugin it work really well but not on all image, i have some image that are blank and it show no image at all.
my website is.
just check the black square and youll see what i’m talking about.
the theme i use is bimber.
it also do not work here
but in the amp article the image show up.
]]>I’m not able to go into the plugin’s settings page as it displays the following error:
Sorry, you are not allowed to access this page.
This is very strange as my WP account is the sole admin account. What could be going wrong here? I’m open to helping debug this issue if needed.
]]>Hello.
Thanks for great plugin.
I am using API to import images from external source which is saved in base64 already.
Is it possible to save base64 image data in wordpress (woocommerce) database and use your plug-in to display the image?
There are up to 4 images per product and they are all in base64 format.
After the last update I have an 500 crash :
PHP Parse error: syntax error, unexpected ‘[‘ in …/wp-content/plugins/base64-images/classes/class-base-64-images.php on line 106
I’m on PHP 5.3.3.
Thanks
]]>hi there,
thanks for the plugin.
I am getting this:
Warning: Missing argument 2 for Base64Images::clear_cached_image(), called in /.../wp-includes/class-wp-hook.php on line 298 and defined in /.../wp-content/plugins/base64-images/classes/class-base-64-images.php on line 90
after tried to minify CSS with my caching plugin. (or it was a coincidence)
how can i correct that?
]]>It would be handy if this didn’t do every single image.
Maybe it could only convert the image to base64 if doesn’t have a class of ‘b64-ignore’ or something like that?
]]>This plugins is a good idea for small images under 100kb maybe. But when images get bigger its good to download them in parallel.
This plugin should have a setting for max file size to process. Like google pagespeed does it.
]]>Hey! Loving the plugin, just having one issue.
Woo Commerce category images – rather than encoding them or skipping them, the plugin has them return an empty src. All other Woo Commerce images are either encoded or skipped – it is only the category images that are broken.
Any thoughts on how to solve this?
Thanks!
]]>