You can register a new image size by using add_image_size()
add_image_size( string $name, int $width, int $height, bool|array $crop = false )
Parameters
$name
(string) (Required) Image size identifier.
$width
(int) (Required) Image width in pixels. $height (int) (Required) Image
height in pixels.$crop
(bool|array) (Optional) Whether to crop images
to specified width and height or resize. An array can specify
positioning of the crop area. Default value: false
Related Posts:
- How to delete resized (cropped) image uploads and prevent future resizing?
- custom image size with New Media Manager in wordpress 3.5
- Alter image meta fields in the Media Library
- Is it a good practice to change media settings on theme activation?
- WordPress append -1 to the image name
- WP is showing wrong image dimensions
- get attachment title based on attachment id
- Get Image Description
- Media Upload Folder – how to manage
- Wrong image dimensions in Insert Media after add_image_size()
- PHP Fatal error: Call to undefined function download_url()
- Upload multiple images in a custom metabox
- How can I hide media library images from general users?
- Strange img srcset behaviour
- Images uploading to wrong folder
- set_post_thumbnail_size not cropping featured images, but reducing proportionally
- How to add php to theme to show alt attributes
- Get URLs for All Sizes of Image via Admin Panel
- Rename image during upload using date and time stamp?
- Images in the Twenty Fourteen theme
- Get author ID with attachment ID
- Show Post Excerpt in Image Attachement
- WP 3.4 has missing photo data
- What’s the best “insert all images” plugin?
- Image Quality Thumbnail Compression in WordPress?
- Gutenberg editor get post featured image by id
- How to add image id class?
- Local WordPress installation doesn’t crop images
- Image resize using url parmater
- How to display / include a specific jpg on a page
- Grab remote images and update links in existing posts
- Get image URL after image created from canvas and sent to WP uploads with AJAX
- How can I use cached images in an AJAX response?
- Can’t get images to align with Gutenberg editor
- Searching for any images in media library displays “no media found”
- Resize header image
- Retrieve image from content, assign it as a featured, and then remove it from the content
- Custom Loop, Match Category with Page: How to display post featured image?
- Modifying the HTML Output of Inserted Images
- WP 5.3 Removing Default WordPress Image Sizes
- Include an image within auto the_excerpt?
- Google verification challenge with file location
- Remove height attribute from wp_get_attachment
- How do I retrieve an image’s width and height using Advanced Custom Fields?
- wp get attachment image always gives me thumbnail
- Images are not showing after moving WordPress installation from server to localhost?
- Images are not showing up in “Uploaded to this post”
- A little confused as to what add image size actually does
- Get thumbnail URL :)
- Right click© images: protection
- Cache DB queries result
- Remove “%” from strings in serialized arrays in wp_postmeta
- Images not found after migrating WordPress website
- Adding srcset to an image in ajax
- Error uploading images in wordpress
- Disable Media File Image Link On Mobile Devices
- Set two default featured images
- Automatically generate missing images
- How to insert image path in database to display product image in wp-admin?
- Apply nextgen-gallery lightbox effect [closed]
- VT-resize (great alternative to timthumb) : Errors cropping (litespeed, centos 6.3)
- How can I externally retrieve a post’s custom sized image
- Page speed error: “serve scaled images”
- View photo album without having to scroll down for each picture
- How can i sorting and display image order by siz in media library?
- x2 images for retina?
- Save media files (images) to database instead of the filesystem
- i want to change URL of WordPress image or rewrite in runtime
- Load url image full size in thumbnail, medium, large size
- After migration, all featured images using accentued characters in their file names are displayed “blanked”
- Adding numbers to an image based on co-ordinates
- A query to substitute images paths in gutenberg (website migration)?
- WP Large Images crash page
- WordPress can’t detect any thumbnails size?
- Remove image border in twentyeleven theme [closed]
- How to resize image in wordpress from backend? Seems like bug in wordpress
- How to display posts with images in fullscreen slider
- What is the best way to handle Ajax image upload on front end?
- 403 Forbidden when accessing image in wordpress
- Why doesn’t WordPress make thumbnails for videos?
- For what does WP generate Thumbnails?
- Images are not shown
- Thumbnail gallery by date and taxonomy
- Adding multiple images on my site – without using plugins [closed]
- Remove the height limit on wordpress 3.4.2
- > added to images link in WordPress
- Image media upload problem in page editing modus?
- Thumbs and pictures not showing anymore
- Is there a good way to use CMS images with CSS
- Upload image from other server without resize?
- Images will not attach to posts after site migration
- How to access & display images from a post without textual content ( and vice versa) according to best wordpress practices
- Forcing absolute src links in the RSS feed
- where is images/image.jpg?
- Using the on-board image editor for featured images: edits are not being used
- change with CSS the color of an svg background image set with “background-image: url()”
- What type to upload image within theme options?
- How to import external media items into wordpress media library (without using storage)
- How to return responsive images from a sanitize_callback?
- How to disable Right Click on a image? [closed]