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?
- CSS how to target the caption of one individual image?
- How do I set attributes for all images in a site
- Restricting users to view only media library items they have uploaded?
- Programmatically adding images to media library
- Add image size where largest possible proportional size is generated
- Rename files on upload
- How to set the default embed image size
- How to add a CSS class to every image in a Custom Post Type
- Remove title attribute from images
- WP 4.4 aspect ratio with responsive image
- Prevent Width and Height Attributes in Image Tag Output
- How to associate an image with a term taxononmy and publish it on frontpage?
- add data-attribute to all images inside the_content()
- Removing Title Tag from Thumbnails
- WordPress login page logo customization
- When Uploading JPEGs, Does WordPress Compress the Original Image?
- New image size option not showing
- Make alt text required when setting a featured image
- How can i use wp_get_image_editor for image resizing
- Gallery images stored elsewhere (preferably Google Drive)
- WordPress gallery previous/next buttons showing all media library images
- Images not showing after moving site (but path id OK)
- 3.5 media.editor: what is the event listener for choosing an image?
- Display latest 12 images from media library
- SEO – Media File Name Updating
- Extracting gallery images in WordPress 3.5 on index.php
- Multiple images in one attachment page
- How to keep WP from recompressing Full Size images
- How to get the url of an Image with id
- Missing a temporary folder.error when image is uploaded in admin Set temporary Directory – WordPress 5.2.2
- Get image from parent category
- Images attached to posts from library link to 404 error page
- Images not displayed when moving site to local
- Caption and title in img alt tag are the same?