WordPress.org

Ready to get started?Download WordPress

Forums

How to enlarge images with smaller dimensions to their original size? (2 posts)

  1. Randy78
    Member
    Posted 3 years ago #

    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 http://www.cadecam.com/?page_id=633 you'll see 40 images on a page. Those images have a dimension of 640x480 pixels each but I set a smaller dimension for every image of 335x251 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.

  2. Marventus
    Member
    Posted 3 years ago #

    Hy Randy,

    Did you try the NextGEN Gallery? Even though it uses thumbnails to show the 'first preview' of each picture, it lets you specify the size of those thumbnails, so you could set them pretty much to whatever size you want (up to the limit of the actual size of each picture, of course).
    Hope this helps!

    M

Topic Closed

This topic has been closed to new replies.

About this Topic