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
- Change the default-view of Media Library in 3.5?
- Get All Images in Media Gallery?
- Programmatically adding images to media library
- How do I select an image from Media Library in my plugin?
- Media Library plugins for better file management? [closed]
- How to add subfolders in media library for better organisation?
- Minimum Dimensions Requirement for Featured Image?
- How to display .ico files in the media library
- Upload images to remote server
- List of available events for wp.media
- How to delete resized (cropped) image uploads and prevent future resizing?
- Uploaded images don’t show in Media Library if there are special characters in IPTC Keywords
- What’s the proper way to find and remove duplicate images from posts and the media library?
- Which filters or actions to use after a media upload and delete?
- print_media_templates not applied in media manager plugin
- Uploading Images to Media Library via wp_handle_sideload() fails
- Separate Media Library for each user
- WordPress 3.5 attachment_fields_to_edit and media_send_to_editor
- Bind event on Media gallery elements WordPress
- Why is wp_get_attachment_image_src not working with my custom size (add_image_size)
- How to upload an image in the plugin’s options page
- Add class=”media_type” when media is inserted into editor
- Hide custom image sizes from media library
- Post slugs and images cannot have same name?
- How do I ‘rebuild’ the WordPress Media library after transfer to new host?
- Proper way to hook wp_get_attachment_url or any other way to change that url in media library
- How to register images uploaded via FTP in media library?
- How can I list URLs of all audio files within my media gallery?
- Migrating to HTTPS only, most media library links need updating?
- Failing to open advanced-cache.php which is breaking Media Library
- Way to force media uploader use custom image size
- Images dont show in grid view, but do in list view
- Filter pictures in the media library [closed]
- WP 3.5 media uploader API set selected item
- How can I hide media library images from general users?
- Is there a way to delete images from the Media Library programatically?
- Add file name column to media library
- Download external images if post is publish
- How can I attach images to a post from the media library?
- Remove the columns in media library
- Is there a way to specify the tab to display when the Media Uploader is displayed?
- How to add ‘Attachment Display Settings’ in custom Media Library?
- How to rename an image attachment filename using php
- How to save attachment data?
- add_image_size creating lots of images (of various sizes)
- Using WordPress as a document library
- Remove duplicate images from media library.
- How to enlarge thickbox media library iframe?
- Use Media Library to manage galleries like Nextgen (with folders, albums, collections, tags, categories, terms…)
- Admin Media grid view images won’t load
- How to modify Media Library images
- WordPress 3.5 Media Manager – Reorder Selectbox items on Media Library Tab [duplicate]
- WordPress function: limit size, only jpg, jpeg, limit of uploaded files per account
- Inserting a Download Link in the Quick Edit Actions of the Media Library?
- How do I remove the entire Media section from the main WordPress navigation without just hiding it?
- Change default screen option value for media items per page (in media library)
- Making the Add Media Link URL into a checkbox
- Cannot access the thumbnails of attachment images… Cannot find the reason
- Add tab on new media library
- Why would image paths in wordpress suddenly change?
- Is there any way to add images to the Media Library through a path on the server?
- Get post embedded image caption
- Media Library page super slow, loading up full quality images
- Can I attach an image to a different post?
- Show ids of displayed media library items
- How can I use the TinyMCE editor for the description field on a Media item?
- Share media among different domains
- Where is the source of the media items filter
- How to get an image transferred via FTP or script to appear in Media Manager?
- how to download all media files into my computer
- Add image to media library from URL in uploads directory
- Import Images from one self-hosted WordPress install to another
- Uploading images to Media Library fails with Memory Exhausted
- Why can’t I edit certain images from the WordPress Media library?
- Upload images from custom plugin using the media modal
- Edit image preview is not displayed
- Set media metadata (i.e. “dimensions” field) on SVG file after extracting it with a filter
- Uploading images: ‘ø’ get replaced with ‘ø’
- Remove image from post also removes photo from media library
- How does the media library determine if a PDF file has preview images?
- How can I autopopulate titles in the media library?
- Function to get image from media library
- Regenerate missing _wp_attachment_metadata
- Upload thousands of images to WordPress without plugin?
- How to make programmatic image upload generate thumbnail and sizes?
- Bulk Import files on Media Library from CSV
- Adding Alt Attributes Automatically when Uploading Images to Media Library
- Adding a querystring to an image URL when clicking ‘insert into post’?
- Best way to strip character entities (%20 etc)