It stopped working
-
Hi,
After the update, the plugin stopped working. So I uninstalled it and installed it back again. Right after the installation, it started creating the cache, but it stopped at:
Total files in the adaptive images cache: 17
Total directories in the adaptive images cache: 14
Total size of the adaptive images cache: 2.16mbObviously, I have many more large images on the server. It basically created a bunch of 1024 images and one 640px image.
In my htaccess I have this:
# BEGIN Adaptive Images #======================= <IfModule mod_rewrite.c> RewriteEngine On # Watched directories RewriteCond %{REQUEST_URI} /wp-content/uploads [OR] RewriteCond %{REQUEST_URI} /wp-content/themes # Redirect images through the adaptive images script RewriteRule \.(?:jpe?g|gif|png)$ /wp-content/plugins/adaptive-images/adaptive-images-script.php [L] </IfModule> # END Adaptive Images
-
PS: It’s already been 9 hours or so since I reinstalled the plugin.
Hello, Laura,
The plugin does not start create the cache beforehand! The cached images are created when (and if) they are accessed. This way the plugin works more efficiently and without creating unnecessary images.
So, in order to see the cache being filled with images one needs to access the pages where these images are displayed. But this is not required at all, as it will happen anyway automatically.
You mean a user needs to open a page from the browser, right? The thing is I already opened myself some of the articles, and the cache still has the same number of images and they are not from the articles I accessed. I opened these pages after emptying the browser’s cache. And I also accessed articles from a phone and a tablet. Still nothing.
The initial problem was that on tablets and phones the plugin would deliver 1600px images, just as I uploaded them, at full size. I still have this problem now after reinstalling the plugin.
For example, in GTMetrix I get this for ‘Serve scaled images’
travelersuniverse.com/wp-content/uploads/2015/07/travel-quote.jpg is resized in HTML or CSS from 1600x1067 to 552x368. Serving a scaled image could save 199.2KiB (88% reduction).
Before the update, it was resizing the images from 1024 to 552.
And the Google Page Speed gives me now an ugly red warning to ‘Optimize images’.
Ultimately, all I care about is for the plugin to serve rescaled images on smaller devices.
I understand. Do you have the HiDPI option enabled? If you do and you open your website from a tablet with retina screen, then the plugin will try to serve proportionally bigger images to it.
I am checking your website in the meanwhile. There indeed seems to be a small glitch and I am trying to figure it out!
Aha, I think I have spotted the problem.
The image
https://travelersuniverse.com/wp-content/uploads/2015/07/travel-quote.jpg
does not have thewww
in the beginning of it. This should not be a problem for the internet in general, but WordPress has one important peculiarity about this.You see if you hit
https://travelersuniverse.com/
in your browser, then WordPress will automatically redirect you tohttps://www.travelersuniverse.com/
, which is expected behaviour! However, this redirection does not happen for images, because when images are requested, then the web server serves them without actually loading WordPress.Forgive me if I am getting too technical here. ??So, to put it simply, when the image is requested like this
https://travelersuniverse.com/wp-content/uploads/2015/07/travel-quote.jpg
, the plugin is bypassed. What you need to do is check how that image got in your website without thewww
in front of it and correct it. Someone must have done that manually.Have I explained this clearly enough? ??
That’s not it, Nevma. I actually copied the link without the https://www. in front because if I post links here my comments enter the moderation and sometimes don’t get published, so I just wanted to make sure my comment got published without me having to check out if they got published or not every 5 minutes.
The images’ URL has not been altered manually. So they all have the https://www. in front.
This is what I have in the plugin settings:
Resolutions: 1024, 640, 480, 320
Bigger dimension: NOT checked
HiDPI support: checked
CDN support: NOT checked
Cache directory: cache/adaptive-images
Watched directories: wp-content/uploads and wp-content/themes
JPEG quality: 65
Sharpen images: checked
Watch cache: checked
Browser cache: 6 monthsUrelated question to the problem at hand: If I want my images to display nice and crisp on retina screens, do I have to upload the images @2x? That’s what I do now. I upload all images at 1600px so they would show great when displayed on a 13inch screen where the width of the body copy of the template is 800px. I wouldn’t really go for even larger image files. But I was merely wondering if I would actually upload 800px images and still have them looking amazing on retina.
Well, to make things easier, here’s the exact link where that particular image is displayed:
https://www.travelersuniverse.com/best-travel-quotes
As you can see in the source code, each image has the www in place.In the meantime, the cache size shows the following info:
Total files in the adaptive images cache: 31
Total directories in the adaptive images cache: 26
Total size of the adaptive images cache: 2.64mbYet, the cached images are not sourced smaller on mobile devices. And most of the cached images are 1024. Only a couple of them are smaller than that.
Hello, again, Laura,
First the retina question: Yes, your thought was correct, if you want crisp images for a 800px wide retina screen, then you need to upload images of 1600px. And you also need to check the “HiDPI support” option of the plugin, of course.
Now about the original issue: I just checked your website with GTmetrix (https://gtmetrix.com/reports/www.travelersuniverse.com/IQC0r5Ir) and you get a 99% in the “Optimize Images” Pagespeed section. The optimization that GTmetrix proposes would save you a mere 124bytes, which is really nothing to worry about.
Also: the free version of GTmetrix uses a desktop browser (https://d.pr/i/1h649) to provide the test. So, it is not really the most reliable place to test the plugin at work. That is unless you have PRO version and there are mobile browsers available there. Instead I would recommend Webpagetest (https://www.webpagetest.org/) for more accurate mobile results – this is my ultimate testing tool!
The latest checks I made at your blog (either manually, or via the tools) show that the images are being resized correctly. Even the https://www.travelersuniverse.com/wp-content/uploads/2015/08/homepage.jpg. Here is a screencast of my test https://www.youtube.com/watch?v=7_EwCHKkObU which shows this.
Cheers,
TakisThanks, Takis!
For some unknown reason, Google page speed stopped complaining about the image size. So that’s great!
I see that you mean regarding the GTmetrix. The free version seems to test the websites on a desktop with a pretty small screen, maybe 11inch? My homepage seems to do pretty well indeed, but that’s not where people will land coming from google.
When I test my latest article that only has 1 image, I get a score of 69 for ‘serve scaled images’ – gtmetrix.com/reports/www.travelersuniverse.com/ImJBCG6U
Even more so, if I text a page with several images, I get a grade of 0 for ‘serve scaled images’ – gtmetrix.com/reports/www.travelersuniverse.com/TorrxaJm
That’s because they are resized in HTML or CSS from either 1600 or 1100px width (that the size I uploaded them originally on the server, for landscape and portrait orientation).
If the images on the GTmetrix desktop screen are served at 552×368 and 550×825, why are the images resized from 1600 and 1100px instead of 1024px or 640px as set in the resolution field of the plugin? That’s what the plugin used to do before, serve the images in 1024px to GTmetrix.
If I save an image from my iPhone5 (640px resolution) it saves as 1600px wide image, although, true, the image size in kb is smaller (example – original image 208kb, image saved from iPhone 146kb)
Many thanks!
Hello, Laura,
For a travel blogger you are a very thorough webmaster! ??
Well, about GTmetrix and the screen it uses, I am not sure exactly how small it is. But if that screen is bigger than you biggest breakpoint in the Adaptive Images plugin, then the plugin will serve the original image, without touching it.
About the “served scaled” images issue, this is actually a CSS issue. In an ideal world one would serve each device exactly the image sizes that are optimized for it. That is the recommendation. But there are sooo many different devices out there with so many different dimensions, that this is impossible. Multiply this by 2, because each device can be viewed in the landscape and the portrait orientation. So, what we do in responsive design is to have a kinda fluid images technique, that helps images adapt to device sizes. It is not optimal in browser performance wise, but it is very clever and efficient. And, to be honest, the trade-off is really tiny.
Now, I cannot be sure why GTmetrix is not being served images of 1024px now. Maybe their default screen has changed? However, if you do not care much about the extra storage taken up by the cache, you can add some more breakpoints even for bigger screens, eg 1280, 1440, 1600, so that the plugin will take care even the images even for them.
Also, concerning your iPhone, are you sure this happens? Is it possible that you have the “Bigger dimension” option enabled? Because, this would cause the plugin to take into account the landscape orientation of your phone, which is 568 with a device pixel ratio 2 (retina). If this is not the case, then can you please tell me which this image is, so I can test it myself?
Cheers,
Takis
- The topic ‘It stopped working’ is closed to new replies.