There are two parts to the answer:
-
You can set the size of images using add_image_size. This is done in your functions.php.
add_image_size( 'background-image', 900, 500 ); //900 px wide 500px high - no crop
-
Once this is set you will need to regenerate your thumbnails. There are number of great plug-ins that can help you with that task. After you add the new image size all future imports will be sized correctly. Now to use it you can call the WordPress thumbnail:
the_post_thumbnail('background-image');
Depending on how you saved the image, you may need to use another method to recall the image size but there are a number of ways to do this.
Related Posts:
- Change background color with a dominant from picture
- Is this possible to attach the background image to a div instead of body?
- Implementing “Random” to custom-background
- How to remove custom background?
- Custom Background not Appearing
- Change background image per page
- Add custom background to section in home page
- Blank/White on certain parts of pages
- Custom Background default color not changing
- How to change the background color that appears at top when we pull down a website on mobile device?
- Inserting a background-image
- Add border/background color/color text of embedded pop-up [closed]
- Jumbotron not showing up on Firefox or Safari
- Custom Background: Can’t Set Color Default
- background not fixed and scaled on iPhone (but working on every other device)
- featured image as background image on pages
- How do I add settings to the Background Options Page?
- How WP_Customize_Background_Image_Control is supposed to work?
- How to get attachment id of background image?
- Add custom background to div in home page
- Display custom_background outside wp_head()
- FireFox Inspector :: find CSS file related to
- Multiple Custom_Background, is it possible?
- Custom background for the index page only?
- Get background color for Live Preview with Theme Customization API?
- @wordpress/create-block image url in css
- Custom Background-Image not showing up
- How to add background image control to page admin controls?
- How to customize a divs background dynamically using Advanced Custom Fields Plugin?
- Weekly background code not working
- Rotating background images with admin options
- Add Custom Background Properties to Customizer
- How to handle a background-size: cover image in WordPress?
- Background image not appearing
- Custom header tiling?
- Custom Background by Page IDs
- Using featured img as div background
- Different background images on different sites [closed]
- Change background color of subpages
- I can’t change the body background-color through style.css
- Is there any way to register custom background images like header images?
- HowTo: develop WP template with dynamic background image
- Placing background image over section divider
- Section Background Images?
- How to use WP Theme Option: Custom_Backgrounds on specific element?
- override a css style [closed]
- Change the background of each post according to the category
- Random sidebar/widget background
- How to change the background color of my header dynamically based on a Custom Posts types color value?
- Random home page background images with caption text
- Display background color or image with custom meta box?
- Post to inherit custom category background image from parent
- Background image no longer fits to screen now that project is in php files
- Fullscreen Page Background without Plugin [closed]
- Structuring Nav Menu and Background Custom page (Help)
- 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
- Change background image page header overlay for each category
- Fetch customizer image and output as an inline css style background image
- Setting multiple videos for the video background
- Custom Background for each page and post
- Setting up Custom Background [closed]
- Featured Image as Background with Offset
- Change Background Color For CPT Template
- Return value of get_background_color
- custom-background callback breaks media uploader
- Different body image backgrounds on different pages, posts and categories
- Inline Styling a div from a Custom Metabox
- Featured image url
- add class to background image
- Replaceing _custom_background_cb
- Why, when it comes to custom background and image, does ‘The first value registered’ win?
- Removing backstretch image from pages/posts
- background_image support multiple image size?
- Create a body div using CSS [closed]
- Problems Replacing Background Color with Static Background Image in Responsive Design
- default custom background image not saved in database when creating a new site
- How to insert a clickable and fixed background [duplicate]
- Custom background for the index page only?
- How to Disable Color Options?
- change with CSS the color of an svg background image set with “background-image: url()”
- Featured image as background in a div using headway
- Change background image based on tags
- background changed after WordPress update
- Custom background not showing
- Placing a background image with text over it
- Post interior margin in twenty eleven theme
- how to change background color of my all post