Home / functions.php / add_image_size to your theme
  • How to add_image_size to your theme

    add_image_size-to-your-theme

    Adding this PHP code to your functions.php will allow for additional images sizes within your theme.

    ( click code to copy )

    wordpress snippet : PHP

    <>
    function mytheme_setup() {
    	add_image_size('featured-thumbnail',640,320, true);
    	add_image_size('x-large',800,800, false);
    }
    add_action( 'after_setup_theme', 'mytheme_setup' );
    

    ( WordPress codex functions, hooks, in this snippet. )

    add_action, add_image_size,