WordPress.org

Ready to get started?Download WordPress

Forums

WP Tiles
[resolved] Images showing up pixellated in tiles (4 posts)

  1. athousandguitars
    Member
    Posted 1 year ago #

    Hi there,

    I use this awesome plugin at http://www.athousandguitars.com/. I've customized it quite a bit, but I'd like to know if there's any way to change the way it picks up images so that they do not come up so pixellated on the first tile, always.

    I understand that obviously, if the image is really small, it'll show up pixellated because it's stretched, but the most recent 2 images are definitely big enough to cover the first large tile, and they are still being pixellated.

    Any thoughts?

    Thank you.

    http://wordpress.org/extend/plugins/wp-tiles/

  2. Mike
    Member
    Plugin Author

    Posted 1 year ago #

    Hi there, compliments on your website! The tiles look really sweet this way - let's fix the pixels..

    By default, wp-tiles uses the post-thumbnail size for it's images, which you set for your theme. One option would be increasing this. If your theme uses post thumbnails (featured images) elsewhere, you may want to leave this size as it is.

    To change to a custom size, you can also use the wp-tiles-image-size filter. You can use one of the default sizes of WP, thumbnail, medium or large (which will take the values set in wp-admin » Settings » Media) or add your own image size.

    For example, to use the medium size:

    function wp_tiles_custom_image_size( $size ) {
        return 'medium';
    }
    add_filter( 'wp-tiles-image-size', 'wp_tiles_custom_image_size );

    See also:
    http://codex.wordpress.org/Function_Reference/set_post_thumbnail_size
    http://codex.wordpress.org/Function_Reference/add_image_size
    http://codex.wordpress.org/Function_Reference/image_downsize

  3. Mike
    Member
    Plugin Author

    Posted 1 year ago #

    Mind the typo in the example.. there should be another quote after wp_tiles_custom_image_size.

    function wp_tiles_custom_image_size( $size ) {
        return 'medium';
    }
    add_filter( 'wp-tiles-image-size', 'wp_tiles_custom_image_size' );
  4. athousandguitars
    Member
    Posted 1 year ago #

    Thanks! Setting/changing the thumbnail size didn't work for me for some reason, but your code did. I just need to optimise my images for the web now, but the site looks heaps better without the pixellation.

    Thanks a mil!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.