-
AuthorPosts
-
April 11, 2023 at 10:00 pm #1404169
Hi,
I just noticed my logo looks stretched and is resized. You can see the original logo here.. The site with the stretched logo is here.. I also saved the logo and the logo is reduced to 300 x 100.April 12, 2023 at 4:50 am #1404186Hey virtualbis,
Thank you for the inquiry.
This is the actual image used for the logo. (see private field)
Did you install an image compression plugin? Please delete the current logo, upload it again and make sure to select the full size version before inserting it as logo.
Best regards,
IsmaelApril 12, 2023 at 7:11 pm #1404256Hi, I don’t see any compression plugins other than SG optimizer and compression is off. I have deleted and re-uploaded the logo multiple time. Can you please have a look?
April 13, 2023 at 12:08 pm #1404338Hi virtualbis,
I have re-uploaded the logo (300px width, 100px height) and it seems to fix the issue.
Please review your site.Best regards,
NikkoApril 13, 2023 at 5:05 pm #1404370HI Nikko,
yes the 300 x 100 works but that doesn’t solve the problem. I would like the logo to be larger and as recommended 340 x 156. We need to find where the compression is happening.April 14, 2023 at 8:09 am #1404431Hi virtualbis,
I think the compression is happening in cloudinary based on the set height and width of the image, the default height and width set in Enfold 100px height and 300px width, this can be changed by adding this code in your child theme’s functions.php:
add_filter('avf_logo_dimension', 'custom_logo_dimension'); function custom_logo_dimension($dimension) { $dimension = "height='156' width='340'"; return $dimension; }
You may also want to change the height of the header in Enfold > Header > Header Layout (tab) > Header Size set it to custom pixel size, then set Header Custom Height.
Best regards,
NikkoApril 19, 2023 at 6:44 am #1404901It seems Couldinary support found the issue. please see below. Not sure why the image recommendation is Logo Dimension: 340px * 156px if it’s reduced to 300 x 100.
“The theme is controlling the logo size, so I found this page: https://kriesi.at/documentation/enfold/logo/ which gives some details about customization. Based on this, it seems we can use a hook to handle the logo but the $logo itself is a full string so using the following hook in the functions.php of the theme here, we can add the right width and height to the element, as in this example:
add_filter(‘avf_logo_final_output’,’resize_logo’);
function resize_logo($logo)
{
$logo = str_replace(“height=\”100\” width=\”300\””,”height=\”157\” width=\”341\””,$logo);
return $logo;
}Now the logo doesn’t look stretched anymore.”
April 21, 2023 at 12:51 am #1405104Hi,
Glad to hear that you have this sorted out, and thanks for sharing your solution. If you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘site logo is stretched and resized’ is closed to new replies.