This is not the best practice, it seems you should have an image for desktop and another one for mobile in order to fit well the screen.
However, you can set where to focus using the background-position CSS Property.
.imgBackground {
background-image: url('image');
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center bottom;
}
Check this life example.
Related Posts:
- Multiple amp-image overlays. How to properly do this in wordpress?
- Using SRCSET with Images and Featured Images
- Disable Media File Image Link On Mobile Devices
- Responsive images with srcset
- How do I disable responsive images in WP 4.4?
- WP 4.4. responsive images browser choosing the “wrong” one
- How to insert pictures without hard coded dimensions?
- Making WordPress Gallery (.gallery-item) Responsive?
- WP 4.4 aspect ratio with responsive image
- How can I serve different images depending on screen size with wordpress
- How to Make WordPress Default gallery responsive on mobile?
- Responsive background images added inline
- Responsive Images – Add srcset attributes to custom Images Function
- Get a list of all image sizes that match aspect ratio of original one
- How to exclude an image size from the WordPress srcset
- Responsive Images Resizing Images
- Featured image (responsive) above content is too small after update to WordPress 4.4
- How to display a different image size for mobile
- WP Responsive images – upload custom image sizes
- Mobile Featured Image Bug
- Fuzzy Images in WordPress 4.4
- Removing height and width from images with a caption
- How to create ‘Local’ filters for WordPress srcset sizes in template parts?
- Fallback for missing srcset images
- max_srcset_image_width doesn’t work as intended
- Scaling images for mobile
- Understanding WordPress image sizes and responsive images
- Custom responsive ‘featured image’ sizes
- One of my image sizes isn’t showing up in srcset
- How to stop WordPress from completely overriding my tags in my templates?
- Adding srcset to an image in ajax
- Row background image not showing in mobile browser served from wamp local host
- Disable save as image on smartphones using all browsers ( chrome, firefox, ie, cm, opera )
- the_content not showing responsive image attributes srcset or sizes
- Serve different images per screen size and cache possible?
- All 3?: Responsive resizing of images + image width of actual image for small images + max-width for all larger images
- Change Image Sizes for Mobile Theme
- Web App mode leaves users stranded when following image links when using WPTouch with W3 Total Cache [closed]
- Why does WordPress list all image sizes in srcset even if they’re larger?
- Responsive header image
- What’s are some best practices for responsive images (e.g. for section headers)?
- WordPress Responsive Image ( srcset ) not work properly
- Where to put code that customizes API
- Responsive Images – Defining
- Responsive Featured Images Not Working
- Getting extra image links in code with wp_get_attachment_image
- built-in responsive images in content – do I need to add anything to functions.php?
- Full size image from srcset ALWAYS used on mobile DESPITE setting size of image in editor
- Responsive images in Bootstrap 4 slider
- WordPress not choosing the right image from srcset
- Responsive Images in WordPress
- Reduce Mobile Image upload size (wordpress)
- Theme files and imagesnot loading on a mobile device
- Is there a good way to use CMS images with CSS
- Font size on image captions on mobile
- Remove one srcset entry from wp_get_attachment_image
- Generate / attach Image srcsets from ACF Image Field
- Remove srcset thumbnail attribute for products in the WooCommerce shopping cart
- wp_get_attachment_image with custom size not rendering possible 2x srcset image
- medium_large image size not displaying properly on the frontend?
- remove or update add_image_size
- Get attachment ID of author_meta image – Attachment Metadata
- Alter image output in content
- How can I remove the image attachment ALT field?
- Insert image in comment reply
- Randomly add a ‘ul’ list of images
- GIF featured image is resized on server but not used in frontend. Why?
- Include photos in WordPress blog posts without uploading to Media Library
- The the post id from image id
- function to show only featured image of the posts
- Changing default img html markup but not in admin back-end?
- Images in Blog List
- Upload image without media-upload [duplicate]
- Time Based change of image
- how to get image full path from WP_Post Object?
- Featured Image problem with resizing
- WordPress Image Scaling Quality
- Not seeing text alignment option in Image block
- wp_get_attachment_url images in wrong order [closed]
- Migrated site – Images have 404 error
- Speed Up Website With High Resolution Images
- How come the images arent loading properly?
- How to use the thumbnail size with catch_that_image
- How to display a warning when an uploaded image is too small?
- How to link image in WordPress – Elementor when certain element does not offer that option?
- Large uploaded images not resizing?
- How to generate alt attributes with php / filters?
- unsharp thumbnails after uploading image
- Access html element in media modal with jQuery
- Exclude first image from a Woocommerce image gallery
- Adding custom html/css/images to Theme
- How to handle a lot of media files in the uploads folder? (+10.000)
- How to enable Modal Image in DWQA Plugin of WordPress?
- How can I add bigger image in my blog post?
- Relative path not working at all in WAMP local environment
- Images in plugin broken after URL migration
- Gallery Images could not be shown
- Gallery with shortcode not showing
- How to get children/attachments in header?
- How To Showcase High Quality Images On WordPress Website?