• dolme

    (@dolme)


    Single page/post image of 1200*800px in my website are featured image.Same image is displayed in front page but inside a div which compresses image to 350*233px. So it shows serve scaled image issue. I want 350*233 px image in front without compressing and when the link containing that image opens in single page I want it to be 1200*800 without uploading two different image. Is there any plugin to do so and remove issue of serve scaled image in GTMETRIX.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    WordPress provides a sourceset of images, so it will provide a list of all available image sizes to the browser. It’s up to the browser to decide which to download for use.

    Responsive Images in WordPress 4.4

    Thread Starter dolme

    (@dolme)

    I am not talking about making responsive. I want same image to be displayed in front page and single page in different size without uploading twice.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Yes, WP can do that. It depends whether you’re manually inserting an image or if it’s handled by your theme.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I see you have a custom theme, so you should check in with the developer about how it codes using the images.

    sinip

    (@sinip)

    If the theme uses a different thumbnail for the homepage / front page than it uses for the single post then that thumbnail’s size can be adjusted using Simple Image Sizes plugin.

    If not, it is time to talk to the theme creator. πŸ™‚

    Thread Starter dolme

    (@dolme)

    I donot have developer that can do this work. Can you make it simple and tell me if there is another way? You might have seen that under Top trekking in Nepal in front page the image I uploaded 1200 * 800 is compressed and it is 350*233 . When we click that link the single page opens with the actual size. In web server there might be an image of 350*233 size created by word-press itself. How can I retrieve it dynamically so that in front page it would be 350*233 and in single page it displays 1200*800?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You need to set the thumbnail size to 350px size and use “the_post_thumbnail” in the loop on the home page to retrieve/display that image size.

    Thread Starter dolme

    (@dolme)

    Thanks for your help.Do I need a plugin to generate thumbnail or there is yet another way to do this?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    See https://developer.wordpress.org/reference/functions/add_image_size/ to add a special image size to your theme. When you upload images, then the new size will be created. You’d have to use of of the plugins that regenerates thumbnails to go back and create them for previously uploaded images.

    Thread Starter dolme

    (@dolme)

    Now I think this will definitely work for me. Thanks for your help Steve

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Serve Scaled Image’ is closed to new replies.