Force all images to full size in page template

This code works, although I suspect that it could be more efficient – or replaced by a better filter. I modified this code from the answer to this question, which was the best choice out of all the googles I spent hours trying out.enter link description here

You will need to change the ‘full’ to the size you want to have (in two places). You can also change other array elements to your needs (after the ‘extract’ function).

I’m open to easier/more efficient ways to do this.

 function change_image_size ($output, $attr) {
        global $post;  // needed to use in the id element
        extract(shortcode_atts(array(
            'order' => 'ASC',
            'orderby' => 'menu_order ID',
            'id' => $post->ID,
            'itemtag' => 'dl',
            'icontag' => 'dt',
            'captiontag' => 'dd',
            'columns' => 3,
            'size' => 'thumbnail',
            'include' => '',
            'exclude' => ''
        ), $attr));
        // here's where you can change/add an attribute to the shortcode
        $attr['size'] = 'full'; // change 'full' to desired size
        $id = intval($id);
        if ('RAND' == $order) {
            $orderby = 'none';
        }

        if (!empty($include)) {
            $include = preg_replace('/[^0-9,]+/', '', $include);
            $_attachments = get_posts(array('include' => $include, 
'post_status' => 'inherit', 'post_type' => 'attachment',
 'post_mime_type' => 'image', 'order' => $order,
 'orderby' => $orderby));

            $attachments = array();
            foreach ($_attachments as $key => $val) {
                $attachments[$val->ID] = $_attachments[$key];
            }
        } elseif (!empty($exclude)) {
            $exclude = preg_replace('/[^0-9,]+/', '', $exclude);
            $attachments = get_children(array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby));
        } else {
            $attachments = get_children(array('post_parent' => $id,
 'post_status' => 'inherit', 'post_type' => 'attachment', 
'post_mime_type' => 'image', 'order' => $order,
 'orderby' => $orderby));
        }

        if (empty($attachments)) {
            return '';
        }

    // Essentially these are only changes I've made
    // you can change the $output to your needs; including changing 'full' to your desired image size.
        $output="";
        foreach ($attachments as $att_id => $attachment) {
            $output .= '<figure>' . wp_get_attachment_image($att_id, 'full') .

'<figcaption>' . wptexturize($attachment->post_excerpt) . 
'</figcaption></figure>';
        }   // change 'full' to desired size

        return $output;
    }
    add_filter('post_gallery', 'change_image_size', 10, 2);