With this little snippet you can add custom image sizes to media insert dialog box.
image_size_names_choose allows modification of the image size lists so that you can place a custom option within the media library.
this months featured snippets
Adding this snippet to the functions.php of your wordpress theme will check if an option was updated by a user. If so, it will save it back to the default option you’ve set. Should work with almost any site option. (inspect element on input field and input’s “id” should be the “name” you need.)read more