I managed that with css. This is how i did it:
-
On your header.php file add a class to your image tag like this:
img class="logo" src="" alt=""
-
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.
Related Posts:
- Custom image size / thumbnail – Crop to aspect ratio even when source image is smaller than set dimensions
- How to delete resized (cropped) image uploads and prevent future resizing?
- Why WordPress automatic cropping all my images?
- How to resize images in wordpress without adding any compression or changing the color profile of the images, possible?
- get_the_post_thumbnail_url with an unregistered size
- Cropped featured image replaces original image in gallery
- add_image_size() zoom-crop
- Theme Customiser Image Control
- add_image_sizes ignoring crop sizes and using proportion
- “There has been an error cropping your image” when cropping image
- Image resize with image url
- Get img alt tag from a Image that has been uploaded through the Customizer
- Cropping an image before inserting into a post
- Why can’t I edit certain images from the WordPress Media library?
- Custom image size not regenerating when image editted
- SSL: How to make customizer images Protocol Relative in WordPress?
- Local WordPress installation doesn’t crop images
- Confusion about arguments sent to add_image_size
- add_image_size() to crop images into squares?
- is it possible to crop cover images in buddypress?
- WordPress crops images differently on retina screens?
- Hero image cropped at different dimensions
- Show image crop window on image upload
- Edit image results in copies of file being created
- Problem Cropping Images From WP Customizer
- wp_customize_image_control deprecated add_tab alternative
- Stop WordPress from cropping images using url parameters
- WordPress images not cropping properly
- Mass crop images: Landscape images -> Portrait images
- How do I get a smaller size of an avatar image
- Force square image crop during upload?
- Disable image rename on upload
- Auto-crop width, not height
- wordpress add image size crop function not working in version 3.8
- VT-resize (great alternative to timthumb) : Errors cropping (litespeed, centos 6.3)
- Plugin to select the custom image crop area
- Apply manual image cropping not to thumbnail but medium_large size
- variable crop option with add_image_size()
- Utilise WP_Customize_Image_Control to only show image picker
- 3.5.x Theme Customize: Handling Custom Control Requests
- How to get WordPress to resize images for srcset?
- How to return responsive images from a sanitize_callback?
- Customize all image captions
- How to upload multiple images to use as gallery in Kirki Framework
- Is possible to open directly the core WP image editor on a modal?
- show hide image script after 4 seconds [closed]
- Restricting users to view only media library items they have uploaded?
- How do I disable responsive images in WP 4.4?
- Filter to remove image dimension attributes?
- How to get a list of all the possible thumbnail sizes set within a theme
- How do I get the avatar URL instead of an HTML IMG tag when using get_avatar?
- Image Upload from URL
- Programmatically adding images to media library
- How do I delete all UNUSED images from my uploads directory?
- Set default image sizes in WordPress to hard crop
- Is it possible set a featured image with external image URL
- get attachment title based on attachment id
- Stop wordpress from hardcoding img width and height attributes
- Handle issues with change of image scaling (rounding) in 4.1 (WP Ticket #18532)
- Programmatically get images by URL and save in uploads folder
- Prevent WordPress from generating medium_large 768px size of image uploads?
- remove or update add_image_size
- Get Image Description
- How to extend the gallery block in Gutenberg?
- Image quality based on image size
- Function to get URL of original uploaded image – full size
- how to get original image using wp_get_attachment_image_src
- What is a good alternative to using $content_width for image optimization?
- get the attachement url for the medium sized image
- Can I attach image to post without adding it to post?
- Automatically replace original uploaded image with large image size
- WordPress crop tool greyed out
- How to scale up featured post thumbnail?
- Upload images to remote server
- Each custom image size in custom upload directory?
- Getting Images from theme’s directory in pages
- Set default image link target in Gutenberg image block
- Add an alignment option for images
- How to automatically add rounded corners to thumbnails?
- WordPress adding scaled images that don’t exist (1536×1536 and 2048×2048)
- Download an image from a webpage to the default uploads folder
- Add image size where largest possible proportional size is generated
- WP 4.4. responsive images browser choosing the “wrong” one
- After Moving a Site to Another Domain, All Images Are Lost
- Prevent WordPress from adding image’ title automatically
- Overide Gallery Default Link to Settings
- Retrieve featured image
- How to change image type for specific size?
- Add new image size to media uploader so users can insert into post?
- How to insert pictures without hard coded dimensions?
- Uploaded images don’t show in Media Library if there are special characters in IPTC Keywords
- How to modify image editor dialog options on WordPress?
- Allow contributor role to upload images and not edit already published articles
- What’s the proper way to find and remove duplicate images from posts and the media library?
- Remove images (files) that were generated when using add_image_size()
- get_post_gallery with Gutenberg
- Is there a hook which fires after all thumbnails are generated?
- Auto Add Image Title,Caption,Alt Text,Description while uploading Images in WordPress
- Is there a simple way to just insert a link to an image (without inserting an image)?
- Watermarking Images with WordPress with WP_Image_Editor