Depending on how important the image is, can you do it with CSS.
CSS3 has an attribute called background-size:cover. This does not stretch the image,but it will scale it until it fits the whole area. Depending on the sizes some parts could be hidden.
Related Posts:
- Adding HTML within an image title attribute
- alt, title tags not showing
- @wordpress/create-block image url in css
- How do I remove generated HTML around images in posts?
- Why html tags are being appended to my pictures?
- How to resolve – IE 6 ignores img “width” properties
- Trying to create a mouseover effect in html using Gutenberg editor
- How can I insert an image map into a WordPress blog post?
- Images will not display, when I call them up with html in wordpress, just two blank small spaces [closed]
- How to fix “.webp” being auto-added to the end of image urls
- Changing default img html markup but not in admin back-end?
- How to handle a background-size: cover image in WordPress?
- Modifying the HTML Output of Inserted Images
- Custom header tiling?
- Using featured img as div background
- Rewrite inline image markup
- Different background images on different sites [closed]
- HowTo: develop WP template with dynamic background image
- Can’t add image to site via php
- Random home page background images with caption text
- What exactly is the description field when uploading an image?
- HTML Img with data:image src gets sanitized in admin?
- Fullscreen Page Background without Plugin [closed]
- Landing Page with HTML CSS JS and Images on wordpress
- I would like to set a FULL SCREEN background image to all my pages (same way it is on my home page)
- How to change background image
- Custom Background for each page and post
- How to link to img src using HTML email template in WordPress
- Relative path not working at all in WAMP local environment
- Display ajax preloader for large images within posts
- Garbled HTML pulled for page description “caption id=attachment…”
- Imagem resolution responsive
- Forcing absolute src links in the RSS feed
- where is images/image.jpg?
- change with CSS the color of an svg background image set with “background-image: url()”
- Issues with the excerpt (wordcount/HTML/images)
- Parallax image problem
- Hover images and Videos
- Gutenberg block HTML image rendering override
- WP 4.4. responsive images browser choosing the “wrong” one
- Retina images – custom syntax for inserting images into post content
- show author image in posts
- Default Image Link Removal
- Replace Woocommerce Images
- How to copy and paste a picture found on the web to wordpress easily
- Graphing libraries for WordPress [closed]
- add_image_sizes ignoring crop sizes and using proportion
- Dynamically add titles to post images if they are empty
- get_intermediate_image_sizes Get the Size Names but How Do I Get the Sizes?
- Cropping an image before inserting into a post
- custom image size with New Media Manager in wordpress 3.5
- Uploading images: ‘ø’ get replaced with ‘ø’
- SSL: How to make customizer images Protocol Relative in WordPress?
- How to add qtranslate multi language support for media?
- Change the URL of an image from wp_get_attachment_image_src
- custom image dimensions (for gallery)
- Do I need to resize an image to fit the post?
- wp_upload_bits does not retrieve images that do not have an extension
- Force minimum image size and aspect ratio when uploading images
- Is it possible to split Default WP Media directory to multiple Folder/Subdomain?
- Add srcset and sizes to older uploads?
- Change align classes for images
- Divi Theme – images not showing on front page [closed]
- Edit image results in copies of file being created
- Images in Media aren’t showing, not broken
- Fixing image names for a site being restored
- Upload Image using wp_insert_attachment and file url don’t have file extension
- Export xml use/import images from theme directory
- Images showing in editor but not in post [closed]
- Why are featured images sometimes cropped, and sometimes not
- How to set uploaded image as featured image wordpress
- Random background image showing on website per click/load
- How to force WordPress to upscale images?
- How to stop WordPress from completely overriding my tags in my templates?
- Image text wrap not working properly on frontend
- How can i add a section of category image upload during adding of category in wp admin area?
- remove enclosure url from feed
- Show last 12 uploaded images on home page, but only from posts
- Thumbnails different sizes
- Link to full-size image for subscriber only
- Slidedeck Pro WordPress Image Size
- Thumbnail and image management
- Change Image Size option in the settings in bulk
- Allow wp media library to check already selected images displayed in div
- How is called this thumbnail slider feature
- Rebuilding core image block
- Custom image size with srcset
- How to get title of images in post content
- Use wget to find used images
- How to source control manage site images
- Server peek by Own-IP-Calls?
- How to modify images during upload
- Change Featured Image Size of the Post
- Surround uploaded image link with div
- Check if post has image
- How do I mitigate the forward slash problem for URLs of images after a WP migration?
- WordPress file browser
- how do i update version for super skeleton
- Display first image’s caption
- The uploaded images are only full-size (original)