WordPress.org

Ready to get started?Download WordPress

Forums

Oxygen
Pixelated Featured Images (5 posts)

  1. @katklopp
    Member
    Posted 8 months ago #

    Here's my site: http://hyperreal.us/

    You will notice that images embedded in my posts look fine. They also look fine in the image slider on the home page, but when they show up as featured images in the posts or as links in "recent articles", the images are really pixelated.

    Do I need to resize the featured image or mess with the CSS to change the resolution for featured images? Is this because I changed the width of my posts and of my featured images? Maybe I neglected to also change some critical bit of code that would also update the resolution? Any ideas?

    Thanks!

  2. @katklopp
    Member
    Posted 8 months ago #

    Can anyone help with this issue? How can I improve the resolution of the featured images so they appear as clearly as they do when embedded in my posts?

  3. paulwpxp
    Font hero
    Posted 8 months ago #

    Because you changed layout width, you have to also redefine image sizes.
    http://themes.trac.wordpress.org/browser/oxygen/0.5/functions.php#L207

    The archive-thumbnail was originally 470x140, now appears as 750x223 so change it to this size and then delete and reupload (or use a plugin "Regenerate Thumbnails" to resize them automatically).

    // redefine image sizes in child theme's functions.php
    
    add_action( 'init', 'myoxygen_image_sizes' );
    function myoxygen_image_sizes() {
    	add_image_size( 'archive-thumbnail', 750, 223, true );
    	add_image_size( 'single-thumbnail', 750, 415, true );
    }

    From what I remember, just redefine the size in child theme function and WP will use these new sizes. If that doesn't work, try changing the priority order of the hook (default is 10) to 11.

  4. PDIuserr
    Member
    Posted 8 months ago #

    I'm having the same issue. I would prefer to redefine the image size in a child theme but I have not been able to get it to work. I found this link:
    http://wordpress.stackexchange.com/questions/74934/remove-or-update-add-image-size I can't get this to work so I overwrote the defined images in the parent theme which creates images at the size I want but when looking at the image tag, it still assigns the old width and height.
    '<img src="http://www.myurl.com/blog/wp-content/uploads/2013/10/01-600x140.jpg" alt="text here" class="archive-thumbnail featured" width="470" height="140">'

  5. PDIuserr
    Member
    Posted 8 months ago #

    I forgot to mention in my previous post that I tried defining the image width and height in my CSS for the classes on the image tag and that didn't work either.

Reply

You must log in to post.

About this Theme

About this Topic