No, that seems to work right. You could test it by doing
<?php echo get_the_post_thumbnail('grade-image'); ?>
try this.
add_image_size( "grade-image", 320, 300, true );
add_filter( 'image_size_names_choose', 'my_custom_sizes' );
function my_custom_sizes( $sizes ) {
return array_merge( $sizes, array(
'grade-image' => __('Grade Image'),
) );
}
Related Posts:
- Image width tag is less than the image pixel width – why?
- Register an additional image size for only some images in my media library
- resize from small images to large
- Featured images get shrunken
- wp_get_attachment_image_src returns the wrong image
- Intersept image upload and generate retina image from source
- How do you alter the default WordPress thumbnail?
- Recalibrate _wp_attachment_metadata Image Dimensions
- WordPress lowers image quality
- add_image_size() in custom theme is not generating and saving any thumbnail
- WordPress not using edited image
- Upload images to remote server
- What’s the proper way to find and remove duplicate images from posts and the media library?
- Separate Media Library for each user
- Bind event on Media gallery elements WordPress
- How to register images uploaded via FTP in media library?
- Images dont show in grid view, but do in list view
- How can I hide media library images from general users?
- Remove the columns in media library
- How to save attachment data?
- How to enlarge thickbox media library iframe?
- How to modify Media Library images
- How do I remove the entire Media section from the main WordPress navigation without just hiding it?
- Add tab on new media library
- Is there any way to add images to the Media Library through a path on the server?
- Can I attach an image to a different post?
- How can I use the TinyMCE editor for the description field on a Media item?
- How to get an image transferred via FTP or script to appear in Media Manager?
- Import Images from one self-hosted WordPress install to another
- Uploading images to Media Library fails with Memory Exhausted
- Edit image preview is not displayed
- Remove image from post also removes photo from media library
- Upload thousands of images to WordPress without plugin?
- Bulk Import files on Media Library from CSV
- Media library not loading after switching the main site of multisite
- WordPress won’t generate image sizes for certain images
- Different upload path per file type
- “Insert Into Post” For Custom Button
- Display image file size in media library
- remove_menu_page breaks “Add media”
- is there any hooks or action to fire function of insert into post in media library?
- Organize media uploads in folders – I have a physical access to (my) server
- unattached media files that should be attached
- Sorting Media Library by Author Name
- Media gallery: remove “insert into post” button keeping “Insert gallery” button
- Bulk edit of EXIF data for jpeg images uploaded in the media library?
- Image Uploader API
- change video icons to selected thumbnail?
- In Wordress one author can not see the other’s author uploaded images through media library
- How to open default wp image editor screen dynamically?
- Crop image with full width
- Change Media Library thumbnails for non-image files to include the post title instead of the filename?
- attachment media-template data model (data.size.url)
- Add attachment for all images in post
- Media Library, hook on delete user action
- Create a User Role with permissions to only upload files to the media library?
- Why does WP allow to view and media item as a page
- High CPU load when loading images in media library
- Images don’t update after being edited
- Add media button always inserts media on the next wp_editor instance when created dynamically
- Is there a way in WordPress to convert images to WebP without a plugin?
- Is it Helpful to transfer all media library to another host? [closed]
- How to fix broken media library?
- Some Images Disappeared from Media Library?
- Media library on another server?
- Images uploaded on frontend display correctly but not in media editor.
- are unattached media files a problem?
- image not found in media library
- Function to grab specific image IDs from media library.
- Fetching uploaded images using Link URL
- Windows Live Writer inconsistent with Media Library
- Is there a way to programmatically pass a category to the Media Library selector?
- WordPress append -1 to the image name
- Is it possible to limit number of files a non-admin user can upload via the WordPress media library?
- Auto delete content in specific folder inside media library
- Could creation of various image sizes cause slow form submission response?
- imported post image as normal image instead encoded image
- Change thumbnail size for Media Library
- Adding Facebook Open Graph Code does not work for Media Library Attachment Pages
- WordPress Link To Image Missing Dropdown
- Media Categories as Classes on WordPress Gallery Shortcode
- How to display the date a directory folder on ftp was modified
- Change the image for a certain URL
- Assign one featured image to multiple posts?
- Some images don’t get linked when setting link-to to media-image
- Create gallery doesn’t show uploaded images
- Media Library not showing images when adding to Posts (but retrieving image info via ajax)
- WordPress 3.5 Media Manager – Change loaded image Size [duplicate]
- Remove (Unattached) Attach from “Uploaded to” in Media Library
- My image rotate 90 degree
- Uploading pictures to the Media Library: “Specified file failed upload test.”
- How to modify Media Library images DPI [ image quality down to make small in size ] [closed]
- WordPress Media Library
- Create media library feed
- Broken image links in media library after restore
- Store images and videos category wise and fetch them in json format
- My subdirectory sites images (except webP) are throwing to 404 page even they are exist
- How can I use an image from an external source without uploading it to the media library
- wp cli media commands not working
- in classic editor, is there a way to add media lib files to the content search when creating a link?