I am trying to make it so that WP will create another size image for me, but only when the image is uploaded via the Thickbox, and only when it will be attached to a certain ID.

Does anybody know how to do this?

The following works, but will create an image of that size for every upload, which is just inefficient.

```
add_action('after_setup_theme', 'set_image_upload_size');
function set_image_upload_size(){

    if(!{is Thickbox upload} || !{is attached to page 6838}) : // Don't know how to check this...
        return false;
    endif;

    /** Add an upload size for the footer images */
    add_image_size('footer-logo', 60, 40, false);

}

```