add_action( 'wp_enqueue_scripts', 'brian_scripts' );
if ( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 214, 9999, false );
add_image_size('large', 500, 9999, true); //custom size
}
This code is in your functions.php?
The docs for add_theme_support() suggest to only use it in the functions.php of the theme or attach it to the after_setup_theme hook.
Also you’ll need to trigger the resizing of the images every time you change something to your code.
Related Posts:
- Missing feature image link function
- Generating Responsive Background Image Sizes in PHP
- Why are image thumbnails cropped proportionally (not per dimensions)?
- Why are image thumbnails cropped proportionally (not per dimensions)?
- Display height and width properties with the_post_thumbnail() or related function
- Removing the first image in content
- Function to auto-set a featured image that is already in use
- wp_get_attachment_image function size argument not working if I also add a custom class
- Overwriting Parent Theme’s Image Sizes
- Can you put a condition on add_image_size() depending on the width of the uploaded image?
- show first 3 thumbnails of posts in different sizes [closed]
- Set spesific size of featured images
- Can’t generate thumbnail images
- How to hide image-url if no attachment?
- How to add a new image size and apply it to posts only?
- Custom image sizes showing in Classic Editor only when upladed directly to post
- Can You Set A Minimum Image Dimension For Resizing Images?
- Featured image on archive page based on post type
- Printing medium sized image
- Full size image option removing problem
- Image width issue in IE [closed]
- image_size with respect to aspect ratios
- Add image size if page template
- Set JPEG compression for specific custom image sizes
- remove links from images using functions.php
- Issue with wp_get_attachment_image() and SVG file type
- How to change the markup WordPress inserts for post images
- Removing default image size list in Media Box
- WP 4.4. responsive loads normal image after loading the responsive image
- How to create thumbnails for PDF uploads?
- Get recent posts with thumbnail
- How do I use element instead of tags in WordPress post content having webP support?
- Add options to featured image
- Auto delete WordPress images/thumbnails (all sizes) and featured after X days/hours, or similar?
- Gallery images titles – get from post
- Remove images from get_the_excerpt
- Setting featured image with function, 1 part not working
- Best way to programatically add “rel” attributes to page and post images
- Overwrite Parent Theme add_image_size in Child Theme
- img width and height attributes being set by get_the_post_thumbnail
- Count total number of images in post and echo results as number
- Get the 5 lastest Featured Posts from a category
- How to display a default image for post thumbnail using functions.php?
- Getting Featured Image Caption to Only Show if Populated
- Can’t check if a post has thumbnail adding filter to get_post_metadata()
- Add Featured image column into wordpress admin on pages AND posts
- Automatically wrap multiple images in div
- Post thumbnail not showing in WP admin area for custom post type
- Understanding and altering the structure of posted images
- Backstretch.js and thumbnail sizes to reduce loading time
- Image rotation fails to regenerate custom sized thumbnail
- Featured Image Thumbnail Creation
- Display images that are not in the content
- Getting custom image size URL in functions
- media resize/crop possibilities?
- It does not work concatenation in function.php
- Random Featured Image Based on Category
- How to retrieve the current post’s generated featured image size?
- Check if the image size is available and if not use ‘full’ image size
- Way to store featured image width and height in two separate variables?
- srcset and custom field get_post_meta and wp_get_attachment_url
- Limit dimensions of “Full” size images
- Visual Composer creating own shortcodes with vc_map() to return simple Image
- Can set_post_thumbnail be used to remove a thumbnail?
- Woocommerce image sizes missing from Appearance › Customize but not declared by theme
- Need To Change WordPress Meta Tags… Includes wordpress shortcodes
- Need to convert image url to a Base_64 data url with wordpress function..
- Custom Image Size in Insert Media
- Change custom featured image size in twentythirteen child theme
- resizing of thumbnails not working
- Add_image_size not generating correct size
- Using add_image_size in functions.php to get original uploaded file
- show all the posts thumbnails
- how can I change all wordpress media file url to custom cdn url?
- How to change images url in function.php?
- Which filter fires upon setting a featured image
- Can I use ‘Featured Image’ as a hero image and a thumbnail?
- Class parameter in get_avatar args doesn’t get added to output
- remove_filter function to unhook twentysixteen parent theme function
- Images with overlay
- Sticky – Featured Image
- Why am I losing image quality on my site?
- Replace image attributes for lazyload plugin on image elements with specific class
- Frontend Feature image upload not work
- Zip all (original) images from media gallery
- No compression occurs on my jpegs after adding jpeg_quality hook to my functions.php file
- Remove Featured Images from Posts Older Than a Certain Date
- Update add_image_size
- Function the_content
- Set thumbnail from URL, by grabbing image in functions.php
- Dynamically adding Captions to images
- add if statement to the featured image
- Is mytheme_post_thumbnails() still necessary?
- How to resize image from import image url?
- How to crop image in WordPress with aspect ratio for any size of image
- Generate and upload screenshot as featured image for user-submitted post
- How to add height and width dimensions automatically to archive descriptions
- How to overwrite image if it already exists – WordPress, Gravity form
- How Do I Prevent Featured Image Caption Displaying Above And Below Image
- How to force Cover block to use the full size image resolution