WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] add_image_size (4 posts)

  1. frogger_box
    Member
    Posted 1 year ago #

    I really hope someone can help with this because I've looked everywhere.. :/

    I moved a site to a new domain and now add_image_size isn't working at all, it just shows the image in its original dimensions

    am using:

    add_action( 'after_setup_theme', 'theme_setup' );
    
    function theme_setup() {
    
    		add_theme_support( 'post-thumbnails' );
    		set_post_thumbnail_size(314, 170, true); // normal thumbs
    		add_image_size( 'single-post', 950, 425, true	);
    }

    And to view the images:

    the_post_thumbnail( 'single-post' );

    I have checked the GD libraries are installed and they are
    I have tried disabling all plugins
    I have tried regenerating thumbnails for current uploads
    I have also tried uploading new images in new posts

    Any advice appreciated because I'm at a loss as to what to do :(
    Thanks

  2. keesiemeijer
    moderator
    Posted 1 year ago #

    Does uploading images and setting it to a featured image or inserting into a post work normally in the edit post screen?

    What happens when you comment (or remove) the after_setup_theme action?

    // add_action( 'after_setup_theme', 'theme_setup' );

    Are the featured images for normal posts or for a custom post type?
    http://codex.wordpress.org/Post_Types
    http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails

    Can you check by using FTP or whatever file management application your host provides if the images are generated in your uploads folder?

    You've done all basic troubleshooting steps (except switching to the default theme) so try and see if this helps you any further:

    Are the permissions set correctly for your uploads folder and image files?
    http://codex.wordpress.org/Changing_File_Permissions

    Try flushing any caching plugins you might be running, as well as server and/or browser caches.

    Try if you get any warnings or errors that might help us troubleshoot by setting WP_DEBUG to true:
    http://codex.wordpress.org/Debugging_in_WordPress

    And take a look in your servers error log (if you can).

  3. frogger_box
    Member
    Posted 1 year ago #

    Try flushing any caching plugins you might be running, as well as server and/or browser caches.

    Worked a treat! Thank you! I shall add that to my standard debug list!

  4. keesiemeijer
    moderator
    Posted 1 year ago #

    You're welcome. I'm glad you've got it resolved :-)

Topic Closed

This topic has been closed to new replies.

About this Topic