How can I disable scaling/resizing in custom headers?
-
I’m building a theme with custom headers. The header image should have a height of 300 pixels. The width should be whatever the width is from the image.
The problem is, when I don’t fill in the width by custom header, wordpress resizes the uploading image when it’s bigger than 1500px width to 1500px. When I fill in the width option to for example 3000px. In step 3 WordPress is resizing my image to 300px height and 3000px width.
I just want to crop 300 pixels high from the image and have just a custom width. How can I arrange that?
This is my code:
$custom_header_args = array( 'width' => 3000, 'height' => 300, 'header-text' => false, 'flex-width' => true, 'flex-height' => false, 'default-image' => get_template_directory_uri() . '/images/backup-image.jpg', ); add_theme_support( 'custom-header', $custom_header_args);
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How can I disable scaling/resizing in custom headers?’ is closed to new replies.