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
- can I orderby one custom field and meta_query another in the same query
- How to filter get_avatar?
- CSS rules that the theme gets from a function
- How to rotate the header image per day?
- Hide page title in WordPress 3.0
- How to show only Standard Format post in my custom taxonomy page -wordpress 3.8.1
- enqueue script on custom post type archive page
- How to translate month names in “Archives”
- Retrieve and display data from custom db table in admin area?
- Virtual Pages plugins
- What’s the easiest way to periodically (automatically) read static Markdown content into a WP page?
- Why are images not displaying?
- How can I add data to a custom column in the Users section of the wordpress backend?
- Volume mounts when setting up WordPress with docker [closed]
- Problem with using wp-load.php outside of WordPress
- How to remove padding and margin between divi rows? [closed]
- Renaming wp_content problem
- Automatically wrap multiple images in div
- Warning: Creating default object… when altering Customize panels
- Remove image height/width attributes from Image Widget
- WordPress customizer Preview not loading
- Color swatches on category page? [closed]
- User can not login
- show random image in loop if image is not set
- Add content in between of foreach
- How to insert a writing panel between the title and the page content?
- Show custom message/info for authors in add/edit post page
- Editing a post template
- Gravity Forms – gform_field_value – query custom table breaks functions.php
- Let author add field to metabox by pressing a button
- Usage of custom post types in a custom admin menu
- How to set up conditionals in page templates?
- Select input in metabox not updated
- display text generated via custom get query string
- Bootstrap slider not working
- Custom post-type working except for Selecting page-parent
- How could I change contact details in the footer?
- Cannot replace header & footer using “the_content”
- Custom Route Returns 301/Passing Variable from Input
- Menu selection for header
- How to display custom admin pointers (tips/notifications) in Dashboard until dismissed?
- Custom password set/reset link in same URL format as default does’t work
- Two color in one Heading
- Still desperate about multiple TinyMCEs in widgets – is there any good solution to this yet?
- Expressions and str_replace
- How to create a new blog in wordpress?
- Pass the post ID
- If I want social media icons that link to my site’s corresponding accounts, is that better to do with a plugin, or manually?
- Add Image field to CPT
- Will too many overridden css rules lead to performance issues
- Include plugin´s table in custom query
- Uploaded Media Images on Site
- Custom Menu (only showing direct cildren) ACF not showing
- Different titles on homepage vs single based on category