How to enlarge images with smaller dimensions to their original size?
-
I’ve been searching on the web now for a couple of days to find an answer for something I want to do to a couple of images but without luck.
Hopefully someone on this forum has the answer for me.
If you go to https://www.cadecam.com/?page_id=633 you’ll see 40 images on a page. Those images have a dimension of 640×480 pixels each but I set a smaller dimension for every image of 335×251 pixels so they would fit nicely on the page.
What I want to accomplish now is when someone clicks an image it resizes to it’s original size (upscaling it if you will) on the same page (popping to the front sort of speak). Clicking the image again or next to it resizes it back to it’s smaller size. I only want this to happen to the images on this page. I know there are plugins that can do exactly this with two images (a thumbnail and a larger version of the image), think of thickbox, highslide, shadowbox, etc. but I want to do this with only one image (without an actual thumbnail).
Does someone know how to do this with javascript, CSS or possible a WordPress plugin? I tried several plugins already that looked like they would do the job but the problem I always had with those plugins is that they affected EVERY image in your blog and I only need it for these 40 images. A way of inserting code per image would be the best solution… if possible of course.
- The topic ‘How to enlarge images with smaller dimensions to their original size?’ is closed to new replies.