Change the Logo Size without changing image quality.
-
I don’t actually need help with this but it was something I was working on modifying for a while and know quite a few people had questions about.
I know there’s another (or more) posts trying to change the size of the logo without “blurring” the picture. If all you did was change the CSS then it will blur the image.
I changed ever width variable for the logo (functions.php, custom_header.php, and style.css). The most important change I made was more of a trick of the computer. Penscratch automatically crops the logo to fit the dimensions. Even with the modified code, the logo image used is still the cropped image.
All that has to be done is to take your ORIGINAL logo image (make sure it aligns with the dimensions you changed in your code). For me, WordPress/Penscratch made the source image with a title of ./wp-content/uploads/[year]/[month]/[orig_logo_file]-300×96.jpg
I made a copy of that file and renamed it, then renamed my ORIGINAL logo to [month]/[orig_logo_file]-300×96.jpg and copy and pasted to directory ./wp-content/uploads/[year]/[month]
Because the image dimensions are taken from a .js code, it will read the dimensions of the image with that filename, somewhat tricking the code. Hope this helps! Any questions and I will follow-up :)
-
I changed ever[y] width variable for the logo (functions.php, custom_header.php, and style.css).
We can’t edit our PHP files here on WPcom. Perhaps you intended to post this in the support forums for sites using the standalone WP software? If so, https://wordpress.org/support/ specifically https://wordpress.org/support/theme/penscratch
For clarity: https://en.support.wordpress.com/com-vs-org/
- The topic ‘Change the Logo Size without changing image quality.’ is closed to new replies.