• Resolved trident60

    (@trident60)


    Hi Everyone,
    I’ve seen this question in the forums but, as they are usually theme specific, they get shutdown before anyone answers – so I thought I’d try again.

    With every theme, except the WP default themes – and one other commercial theme – all my images get blown up WAY out of proportion. I have 90,000+ images. The featured images are logos/icons and range from 100x100px – 200×200. But they all end up at 380×380, or even bigger.

    I’ve looked through code until the images actually start to look good to me! lol

    Every “image” line in the code/source seems correct to me – I can’t find where these changes are taking place.

    If there a way to force, via plugin or WP core code, themes to not “enlarge” an image? I’d like them to be able to be stay responsive, and make images smaller if needed, but not make them larger.

    Thanks!
    Tri

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator t-p

    (@t-p)

    With every theme, except the WP default themes

    If images are OK with the WP default themes, then my suggestion would be to contact the your theme’s developers. You’ll be more likely to find a good answer from your theme’s developers, for they have the access to its code.

    Thread Starter trident60

    (@trident60)

    Hello Tara,
    Thank you for the suggestion.

    But it’s not just one theme – it’s almost every theme. That’s why I was wondering if there was a plugin, or WP code, that could be used to bypass, somehow, themes from resizing images.

    Basically want a way to make images display in their original size.

    Thanks!

    I encountered that problems before but the issue is from my theme.
    Did you use an Image optimizing “plugin” before, some plugins will resize all the images according to your desired settings. What I’m saying is may you change some confi on your images before.

    What you can do is access the direct or ftp url of one image then see the real image size.

    Moderator t-p

    (@t-p)

    – Image Sizes: By default when you upload any image by using media uploader in WordPress it creates three different size like thumbnail (default 150px x 150px max), medium(default 300px x 300px max), large(default 640px x 640px max), and the fourth is full original image size.
    – if you want to access custom size then add the following code in your function.php (first check if it’s already there):
    add_image_size ( ‘thumb’, 220, 180, true ); }

    Remember, there is no need to add the default sizes, they are automatically included. You just need to add image sizes for custom thumbnails.
    and then call featured image in your template like this:
    if ( has_post_thumbnail() ) { the_post_thumbnail(‘thumb’); }

    Thread Starter trident60

    (@trident60)

    Hey Lord,
    When I access the url of an image directly it displays in it’s proper/original size – crisp and clean – not blurry at all. I’m just wondering why 9 out of 10 themes ignore that and display images in a way that doesn’t show properly.

    Thanks again Tara –
    Sorry if I sound completely uniformed but still confused. When I go to my media library there is only the one image that was uploaded – most are 100×100. There are not 3 different files/sizes. And, as most are .jpg images, they can’t just be enlarged without losing definition.

    It seems that your first response is what I need to do. I’ll have to change the code in every single theme I want to test.

    With so many options available via plugins and whatnot it just seems strange that there is no easy way to display images in their original size ??

    But thank you both for your suggestions!
    Tri

    Thread Starter trident60

    (@trident60)

    Lord – by the wway – no, I haven’t optimized images as they are all fairly small, 5-20K (these are app icons from iTunes and Google Play store). Once I settle on a theme/design I may optimize at that point.

    Thanks!

    The featured images are logos/icons and range from 100x100px – 200×200. But they all end up at 380×380, or even bigger.

    Basing from my understanding, you are using small icons as your “feature” image so that’s the reason why those small images has been stretched out. “Feature” images are design to be bigger in size mine has 600 x 400.

    So what you can do is choose a larger picture for your feature image or combine those icons on one image so that it would display properly.

    Else,
    You have to look on this: https://codex.www.ads-software.com/Post_Thumbnails under “Thumbnail Sizes”

    Thread Starter trident60

    (@trident60)

    Hi Lord – good info! I think that’s what Tara was explaining to me but I wasn’t smart enough to get it ??

    That said, when I edit the functions.php, the images still show up large and blurry…lol

    Here is the code I’ve tried – the last line is the original from the theme which I commented out:

    // This theme uses a custom image size for featured images, displayed on "standard" posts.
    	add_theme_support( 'post-thumbnails' );
    
    add_filter( 'post_thumbnail_html', 'my_post_image_html', 10, 3 );
    
    function my_post_image_html( $html, $post_id, $post_image_id ) {
    	$html = '<a href="' . get_permalink( $post_id ) . '" title="' . esc_attr( get_the_title( $post_id ) ) . '">' . $html . '</a>';
    	return $html;
    }
    set_post_thumbnail_size( 150, 150 );
    	// set_post_thumbnail_size( 255, 9999 ); // Unlimited height, soft crop

    I’ve tried several variations – no joy. I have no caching running and tried in several
    browers. The site, if you – or anyone – wants to check it out is:

    https://healthitlink.com

    Thanks for your help Lord…I’m pretty sure the answer is on the page you provided so I’m going to try more variations and, when I figure it out, I’ll post here.

    Thread Starter trident60

    (@trident60)

    Hey Everyone,

    Just FYI – tried those instructions above in 5 different themes and no matter what changes I made the images were still displayed as very large and very blurry.

    As for feature images being large – that’s great but doesn’t do any good if you don’t have large images…lol

    The iTunes library and Google Play store does not provide large images – Apple only provides 100×100 images. Google does provide 250×250 but, again, doesn’t really mean much if your images are being resized to 600×400 automatically.

    I’m getting the sense that I’m doing something wrong though – I can’t be the only person having this problem but I’m not seeing may solutions for it. Am I missing something completely obvious???

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Images get resized, are blurry, in all themes?’ is closed to new replies.