If I am not mistaken, WordPress just creates these sizes. The only thing you can say is which image you want to pick of these sizes. You can use this piece of code to make the sizes appear inside of the dropdown. Make sure to place this inside the functions.php after adding the image_sizes.
function my_custom_sizes( $sizes ) {
return array_merge( $sizes, array(
'home-hero-s' => __( 'home-hero-s' )
) );
}
add_filter( 'image_size_names_choose', 'my_custom_sizes' );
Where you see 'home-hero-s'
that is the name of your custom image size and the next ( 'home-hero-s' )
is the name you give it to show in the dropdown of the size selector. I don’t know any function that helps with selecting the size you want to upload. So I hope this helps you.
Related Posts:
- WordPress 3.5: Setting custom “full URL path to files” in the Media Library?
- what happens to existing media files when I switch to year/month directory structure format?
- Set limit to media upload?
- Use a separate custom table (not posts) to handle file upload data
- Image upload callback in new 3.5 media
- Add inline uploader to plugin option page
- How to wp_upload_bits() to a sub-folder?
- “Add Media” only shows “Full Size” under Attachment Display Settings
- Differentiate Featured Image from Post Images upon Upload
- Is it possible to trigger some JavaScript when Media Popup is opened?
- How to call WP3.5 Media Library manager?
- I want to replace a media file (pdf) with an updated version
- There’s a way to scale media (images) at 50%?
- How to get all files inserted (but not attached) to a post
- How to protect uploads in multisite if user is not logged in?
- Media Uploader: get deleted files
- Trigger JS when featured image upload window is opened in admin
- Modify the array of selected images in media modal
- 3.5 media manager add CSS / JS to new ‘tab’ iframe content
- Add/change multipart_params parameter when uploading post image
- Post Specific Uploader
- http error when uploading media files
- How to change “Publish” button text for specific page
- Media upload via backend doen’t work after moving site
- Setting higher upload limit
- How to overwrite wp_unique_filename logic
- How can I receive the image id using the media box?
- media sideload image not working with JPG file
- How do I get allowed Media Library upload file extension list?
- Uploading dwg files to wordpress
- Images not being generated at correct size
- Switch between tabs on “Insert Media” dialog
- Use the WP media uploader dialog for uploading a form attachment (non-admin). Offering progress and drag and drop feedback
- Display attachments by the ID of the post being edited in the wp.media frame (frontend)
- Media Gallery Upload photo incorrect way like glitch
- WordPress uploads autocreate folder every month
- Enabling users to upload files
- WordPress Issue : The uploaded file could not be moved to wp-content/uploads/
- making media URL secured
- Is there a way to make my media files unsearchable?
- How to allow logged out users to upload media?
- Is it possible to use media_sideload_image to upload local files?
- Is it safe to allow non-admin users access to media uploader
- Attach media to post by media category
- upload_max_filesize is set to 64 MB already but WordPress is still showing 2 MB
- PHP error when trying to upload .mp3 files via Media Library [closed]
- How to fix the orientation of images when uploading via the WordPress Media Uploader? [closed]
- Is it possible to import all files from a uploads DIR into WP media, retaining paths to the files
- How does WordPress decides how many sizes of an image to create?
- Flat media folder vs multiple directories
- Move media files from the root to date folder structure
- Big file upload give HTTP error
- Can you limit the size of media files being uploaded not using php.ini?
- Image upload to media library fails. Folder won’t create, database insert fail, XAMPP Windows
- Send media uploads to different directories
- Open Media Uploader Link in single post or page
- Remove Media File Items From Server That Do Not Exist in Media Library
- How to change archieve frequency of the media file in uploads folder for wordpress blog
- Cropping thumbnails to specific dimensions on front end post
- Insert attachments from custom uploader into post (regular uploader style)
- How to limit sizes for specific upload programmatically?
- Uploaded images result in a file url with full path on disk appended
- Using WP-CLI “wp media import” to sync files to the media library
- Import media (.xml) does not attribute featured images to posts
- Efficient way to move media folder to another folder
- Make inline uploader (plupload) on options page upload to a specific folder
- Blog suddenly can’t display .jpg
- MIME type not supporting HEIC support type in WordPress
- SVG not displaying in Media Tab in Backend
- media file uploading
- Modify Maximum upload file size text in WordPress Media
- Replicate Media Galley Edit view in Add Media View
- Front-End Upload media with category
- How to manually set an attachment in a post?
- Adding attachment custom field metadata to TinyMCE tag
- Sanitizing existing media library paths and page links from foreign characters
- Issue with upload.php with media
- Media files not loading
- Media files not loading
- Set default “Link CSS Class” in add media admin editor
- media_sideload_image results in http error (500)
- How could you allow users to upload a video in within their profile and display it on a wordpress site?
- How to share media between independent blogs?
- media_handle_upload on mix form fields (not required file input)
- Check if author or uploader id of the attachment(uploaded) image is match?
- WP Capabilities to Add Media, Use Media, But Not Edit Them
- Limit attachment caption characters
- Don’t show avatars in media library
- Organizing the Media Library for Cleanup
- Drag and Drop Media Not Working in Windows 10 Edge Browser
- Insert media while posting is not working with new wordpress update
- Media Library broken images
- Make custom thumbnail size image in media_sideload_image function
- Importing blog failed to download attachments from older (still online) blog
- Upload more than one media files with a post
- Media Gallery doesn’t show (using WP-Read Only)
- Single file upload
- Upload User Avatar from android to WordPress using Rest API
- Can’t upload files 1MB+ [closed]
- Image in binary in the data to WordPress media library