Archived topic
Specify image dimensions for logo
7 replies · Started by Ron on July 17, 2020
gtmetrix and google does not like my logo not having image dimensions
I have add width and heith in the GP Hook for logo call here is the code
"logo": {
"@type": "ImageObject",
"contentUrl": "https://www.sonriseapartments.com/wp-content/uploads/2018/07/SonRise-Logo-D-min.png" width=”409” height=”158”
},
it dose not seem to help google and gtmetrix are still not satisfied
is the code correct
i have messed with the logo width setting in site identity
any help would be appreciated
i have pasted all of the GP Hook code below
<script type='application/ld+json'>
{
"@context": "http://schema.org/",
"@type": "ApartmentComplex",
"address": {
"@type": "PostalAddress",
"addressCountry": "United States",
"addressLocality": "Marysville",
"addressRegion": "Washington",
"postalCode": "98270",
"streetAddress": "7801 47th Ave NE",
"email": "info@sonriseapartments.com",
"telephone": "3605720565",
"description": "SonRise Apartments Spacious Modern 2 Bedroom 2 Bath Apartments in Marysville WA",
"mainEntityOfPage": "https://www.sonriseapartments.com",
"name": "SonRise Apartments"
},
"globalLocationNumber": [
"latitude\": \"48.066751\"",
"longitude\": \"-122.167537"
],
"hasMap": "https://www.google.com/maps/place/SonRise+Apartments/@48.066761,-122.167223,15z/data=!4m5!3m4!1s0x0:0x2db5d76da17b5404!8m2!3d48.0668756!4d-122.1661075?hl=en-US",
"logo": {
"@type": "ImageObject",
"contentUrl": "https://www.sonriseapartments.com/wp-content/uploads/2018/07/SonRise-Logo-D-min.png" width=”409” height=”158”
},
"openingHoursSpecification": {
"@type": "OpeningHoursSpecification",
"dayOfWeek": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday"
],
"opens": "10:00",
"closes": "17:30"
},
"photo": "https://www.sonriseapartments.com/wp-content/uploads/2019/01/Apartments-in-Marysville-WA.jpg"
}
</script>
Hi there,
Strange - the dimensions should exist in the HTML.
Can you try re-adding your logo in the Customizer?
Tom
I changed logo with a different png file, published then changed back to original logo png published
still no joy
lets give it the weekend sometimes changes take a while to ripple out
will check-in first of the week
Ron
Sounds good - let me know :)
Tom
still no change at GTmetrix and Lighthouse chirping about "Displays images with inappropriate size" here is a link of a screen shot from lighthouse
on one of the offending photos google reports displayed size 300 x 144
Actual size 360 x 172
Expected size 900 x 432
could this be related to Generatepress last update
Ron
The latest version of GP grabs the height and width from the image and adds it to the HTML automatically.
Can you confirm you're using GP 2.4.2?
Good afternoon Tom
just confirmed I'm using GP 2.4.2
Do you have any custom functions added to the site via Code Snippets or child theme?