Have you tried to add the background size “cover” inline as well, like so
<section class="hero" style="background: url('<?php echo $hero_image['url'];?> ') cover;" xmlns="http://www.w3.org/1999/html">
Related Posts:
- @wordpress/create-block image url in css
- How to change background image
- change with CSS the color of an svg background image set with “background-image: url()”
- How to reference a theme image in a stylesheet?
- Making WordPress Gallery (.gallery-item) Responsive?
- Adding HTML within an image title attribute
- Width 100%: Aspect ratio of image
- Add CSS class to every image
- How to Make WordPress Default gallery responsive on mobile?
- Responsive background images added inline
- How can I upload an image for background use using the Theme Editor in WordPress?
- Override img class in gallery
- Multiple amp-image overlays. How to properly do this in wordpress?
- Image not shown in the theme as it’s showing in HTML template [closed]
- Background-image not showing? [closed]
- t5-fresh-editor-stylesheets.php breaks image placement in WP Beta 3 editor
- Custom header tiling?
- Using featured img as div background
- How do I get my main image to stretch the full length of the screen?
- Different background images on different sites [closed]
- HowTo: develop WP template with dynamic background image
- How to upload and style svg logo?
- How would you add sequentially numbered labels to images in posts?
- css to fit image by HEIGHT
- How to implement CSS-defined images from bootstrap site in wordpress theme
- a: hover issue with image issues [closed]
- All 3?: Responsive resizing of images + image width of actual image for small images + max-width for all larger images
- Moving an image to the side [closed]
- Random home page background images with caption text
- Image Captions Have a 10px Extra Margin, And It’s Not CSS? [duplicate]
- Can i have 2 separate Galleries on 2 separate pages each go to a DIFFERENT Attachment.php file?
- Image modification
- How to remove image size inline style in article and include caption
- Is there a layout to place 2 same sized images in two columns on the WordPress page?
- 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)
- Change header image size
- Adding custom html/css/images to Theme
- Is there a way to create referable automatic numbering in image captions?
- Custom Background for each page and post
- Why do images inserted in the post content via the_content() go off the max-width?
- How can we achieve this image css style?
- Remove image border in twentyeleven theme [closed]
- How to display posts with images in fullscreen slider
- Using a full-width hero image that can be changed in the dashboard by a user
- Put image onto header
- Are WP images responsive by default?
- Image thumbnail on single product issue | WooCommerce
- Background image call problem
- all images of past post messed up after changing theme
- Custom styling Insert Media window
- Display ajax preloader for large images within posts
- An image on my site is showing as the wrong image [closed]
- Theme files and imagesnot loading on a mobile device
- Is there a good way to use CMS images with CSS
- Stop underlining image links
- Font size on image captions on mobile
- Parallax image problem
- Theme using masonry layout script rendering overlaped images in Google Chrome [closed]
- Why is inline CSS added to images automatically? [closed]
- Create decorative image border with CSS? [closed]
- Placing a background image with text over it
- WordPress update leads to 404 error on admin page and signup. CSS mishap with all plugin related functions
- I am having trouble displaying an image at the top of a widget area [closed]
- Is there a way to add background-image to theme.json?
- Saving the pre-sanitized filename of an attachment as the Title or Caption
- Add aditional class to get_avatar when showing image
- Alter media caption/description conflict in WordPress?
- Loop through child images of a parent for a Nivo Slider
- Limit author image size
- Remove the http protocol from images
- Display one random image, but only if landscape
- How to change image url?
- How to order images in a post in WordPress 3.3?
- Change image url size in post editor (when cliking on image)
- attach image from library to post with wp_insert_attachment
- Bulk-add featured images in posts with no featured image
- How to get image from media library with URL [duplicate]
- WordPress Creates Unused (Unregistered) Image Sizes
- Custom image uploader without widgets
- How to change the catalog product image size by product id?
- are unattached media files a problem?
- Development environment and “production” environment domains
- HTTP error when uploading an image
- Why am I getting and error from wp_get_attachment_image_src?
- Product Images Making a Column
- What’s are some best practices for responsive images (e.g. for section headers)?
- Recreate the upload folder from a website without having access to the backend/cpanel/filezilla directly from the website
- how automatically show the image title before the image caption/description in a wordpress gallery?
- Hot Linked Own Images
- How to set a post featured image from an already made custom field
- Alt attribute is not showing while the value is given in Media
- Alternative image sizes are too large
- How to call thumbnail by aqua resizer in best practice. Specify image dimensions’s notify from GTmetrix
- How do i replace the title attribute of img tag with the image caption
- Why are my ‘medium’ images the wrong size
- How can I hide previous_image_link() on first attachment page?
- Guaranteed Image Sizes
- get_theme_file_uri function not showing background image inside data-setbg in html