Turns out it’s fairly straightforward, just a case of knowing what to search for
https://codex.wordpress.org/Class_Reference/WP_Customize_Manager
In my tyc_banner_image function I added the last four arguments below.
$wp_customize->add_control( new WP_Customize_Cropped_Image_Control($wp_customize, 'tyc_banner_image-control', array(
'label' => 'Image',
'section' => 'tyc_banner_image-section',
'settings' => 'tyc_banner_image-image',
'flex_width' => true,
'flex_height' => true,
'width' => 1920,
'height' => 500,
)));
Related Posts:
- Why doesn’t WP_Image_Editor save images using the Filesystem API?
- Is there a plugin to make attaching images easier?
- Managing Images for a WordPress Blog: Picasa or Flickr?
- Automatically wrap post image in div
- Custom image size not selectable in uploader
- Retrieving and Storing Images Linked from Other Domains on Local Server?
- Customizer image control default value showing in customizer but not on frontend
- Importing media medium setting image gallery / image attachments
- Extract & Display the REAL first image attached to a post – extend the_post_thumbnail()
- Add filename to attachment page url
- How To Add buttons to the toolbar which appears in TinyMce when you click over images
- Image Editor does not affect custom sizes!
- How to display post title & excerpt when mouse hovers on an image?
- Automatically add image caption with values from a post parent field?
- Is there a way to dynamically get to your uploads folder?
- Using Fullscreenr with a wordpress blog – weird bug
- Get Image from Media Library with the Title
- Get Custom Logo Alt Text
- Using custom image resizing script in a page
- Background image not appearing
- Best way to allow overwriting images shipped with the plugin?
- NextGEN Gallery – open all images on page in fancybox [closed]
- Featured Image If Else Condition
- If custom image header does not exist display text header
- Is there a possiblity to replace profile image gravatar with custom user images
- Custom theme – how to link the image without posting it
- Trying to set specific image dimensions and crop with ACF
- Customizing the gallery of the post correctly
- Personalized Gallery what are my options?
- adding fade on mouseover to images
- Lightbox not showing image caption
- WordPress 5: including larger thumbnail image sizes in srcset than I have set
- POST 429 Error when trying to place more than 20 images into post at once
- How to add the option to choose between sizes for featured image within post editor?
- Creating custom setting in add media popup
- Upload image without resizing but insert in post with resizing
- Bio comes up when the visitor clicks on a picture
- Adding images to anchors in the list created and fetched with wp_nav_menu
- Change default “Apply Changes To” radio option when editing images
- WP_Customize_Image_Control and selecting from library?
- featured images – custom links
- Get a different size of Image thumbnail while working with custom metabox
- Custom image sizes ignored in WP 3.5
- Edit image alignment in WordPress twentysixteen child theme on attachment page [closed]
- How to search for replacement titles and contents, excluding image URLs
- Custom Search on media files PDF images pages posts
- Best Practices for Regression Testing WordPress Websites?
- Custom Walker: how to get ID in function start_lvl
- What is true chmod for WordPress?
- wp_trim_words() does not trim the_content() in WordPress
- How can I create an alternative home page?
- Gallery Shortcode: using link attribute to link to a specific image size
- get_theme_mod(); returns nothing
- Limit comments displayed on basis of user_id
- How to Register and Display Widget for Custom taxonomy
- How to access my php page in wordpress
- How to fix the IE9/WordPress Twenty Ten Header Image Display Problem?
- Search result page redirect ex.com/?s=searchterms to ex.com/searchterms
- Add styles with wp_add_inline_style only if modifications exist wp_add_inline_style
- Add custom field to woocommerce variations [closed]
- How would you implement a CTA infront of a videoplayer? [closed]
- How can I get the custom post type assigned to a current custom taxonomy for query?
- $wpdb->replace: WHERE?
- Unable to edit the “customize” section and the “widget” section is populating unknown code
- Can’t receive $args[ ] to my custom widget
- Can I create my own custom Attachment Display Setting?
- What WordPress Hook Is Used Before Signup Data is Saved?
- One WordPress install for main site at domain.com and blog at blog.domain.com?
- How to locate where an element is generated?
- Combine two conditions in one statement syntax [closed]
- Is there a way to add a new value into a stored custom field value?
- Custom Loop Query For Search Page
- spaces in a text
- How can I add interactive python console to my website? [closed]
- Customizing Users in Admin Area
- Good way to customize admin CSS?
- Add table to WordPress database
- get_delete_post_link( $post->ID ) is blank when logged in as “subscriber”
- Menu not appearing in custom theme
- How can i display custom menu in sidebar?
- Custom select query two tables by a meta key
- How to Add Additional Search Button?
- WordPress pagination with custom post type?
- How to replace blog page url with subdomain at all places, even in xml sitemap?
- Add array of post id’s to a category?
- Make the home page template my archive/category page template without code duplication
- Saving of Draft is failing
- Custom Avatars for WordPress Comments VIA Website URL?
- Send default WooCommerce email when switching from custom order status
- Combine Categories & Custom Taxonomy
- Replace image attributes for lazyload plugin on image elements with specific class
- A delete/trash all function?
- Why, when it comes to custom background and image, does ‘The first value registered’ win?
- Unable to retrieve data from multiple WordPress websites on same server
- Unable to show messages using ‘admin_notices’
- How can I add a Description column to the media library browser screen?
- Search a meta field for a value in all posts
- Single page template
- how to add a page
- How to move a widget below the menu in a sidebar in twenty thirteen?