0

In the customize page for the current theme the Current Header's Choose Image dialog shows - a "select and crop" option Select and Crop option in chose Image dialog of Current Header

But the custom WP_Customize_Image_Control shows only "Choose Image". Select Image dialog generated by WP_Customize_Image_Control

Is there a way to define image size/dimension for the images uploaded using WP_Customize_Image_Control, may be by using add_image_size . And will this trigger the WP_Customize_Image_Control uploader to show a "Select and Crop" option ?

ps: There is a request for such a feature as per this ticket.

  • I think there is no way. The only thing you can do for now is recommend a image size for the header to the users of the theme. But I can not confirm this at 100%. – cybmeta Jan 6 '15 at 18:14
  • Can't a filter be used somehow to make this work ? Ofcourse, informing the user is the last option. – Akash Kumar Sharma Jan 7 '15 at 17:09
-2

I managed that with css. This is how i did it:

  1. On your header.php file add a class to your image tag like this:

    img class="logo" src="" alt=""

  2. Then, on your style.css add the logo class:

    .logo { max-width: 200px; }

If needs any change afterwards just go to the Editor and change the value directly in the style.css file.

  • Hi Carlos, welcome to WPSE. Please feel free to take the tour. Thanks for your answer, however this won't affect the size of the crop control in the media library, as the questioner has asked. – Tim Malone May 23 '16 at 1:25
  • Thanks for responding Carlos but I needed it to work through WordPress. – Akash Kumar Sharma May 23 '16 at 6:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.