Question

I installed adaptive-images.php (http://adaptive-images.com) on my concrete5 5.6.2.1 site and it causes no trouble and appears to fire when images are loaded by the browser. But it does not replace the src attribute.

The images in question are in blog posts controlled by the ProBlog Package. concrete5 (ProBlog?) appears to be putting in its own src attribute to a cached image. I assume after adaptive-images.php has done it's thing.

Maybe not.

Has anyone had success with this setup? is there somewhere else I need to be looking?

Bob

Was it helpful?

Solution

adaptive images doesn't actually change the image src. The code gets the src for the original image, checks if a smaller image is needed, if yes and it doesn't exist yet, it generates it and then returns that image. What it means is the html will then load the new image believing it is loading the original => no src is needed. What you need to do is check the size of the loaded image to see if it's the original or the resized one.

Also remember that it works with screen size not with browser size so resizing your browser won't do anything, you have to actually try it on a smaller device.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top