This topic has 15 replies, 3 voices, and was last updated 7 years, 4 months ago ago by Laranz
Hello,
GTMetrix told me to “Specify image dimensions”. I checked the listed images and noticed that only the hover images (the images that appear on shop catalogue page when I hover over the featured image) dont have image dimensions. The featured images do have image dimensions and are using src, as is should be. Why isnt it the same with the hover images? Also, it always loads the full size image, not the smaller catalogue-size-version.
Is it possible to fix this in the next update and to tell me how to fix it now?
Many thanks in advance!
Hi,
Can you show us the URL of the website where this issue occurs? If you want that private, use private content.
Let us know,
Thanks,
laranz.
It happens on every page with royal theme and hover/swap images enabled. Please find my page in private content. Thank you.
Hi,
Can you pass me the WP/FTP Login details in a private reply, so that I check that on your website?
Let us know,
Thanks,
laranz.
The issue has nothing to do with my website, it happens on all websites using Royal theme. To clarify what I mean, I have added some details in private content as I dont want my url or screenshots of my page to be public. Thank you.
Hi,
Yes, I ask the details to check the fix in your website. 🙂 If you give I will change the code that will fix that.
Let us know,
Thanks,
laranz.
Ok but this will take a few hours as I am not at the computer right now. Isnt it possible to post the required changes here, so others can profit too?
Thank you.
Please find ftp credentials in private content.
Many thanks in advance.
As I did not get any answer, I just added width="420" height="420"
to the hover img tag in content-product.php. That solved the GTMetrix advice but I guess that this is not the best solution, right? What would you suggest?
Hello,
Sorry for the delay.
Please use your variant as temporary solution. It will be fixed in new theme update.
Regards
Great news, thank you!
When will the update be out?
Hello,
We’re waiting for news from our developers as they are still working on the update.
Regards
Hi,
Instead the changes you made, you can use this
<?php if ($hoverUrl != ''): ?>
<img src="<?php echo $hoverImg['url']; ?>" width="<?php echo $size['width'] ?>" height="<?php echo $size['height'] ?>" alt="<?php the_title(); ?>" class="show-image">
<?php endif ?>
it is more elegant way, but we already take this in to developers so they will fix this up in the upcoming updates.
PS: I tried to change that in the FTP, but it didn’t reflect in the front-end, I think there is some cache. So I pass the solution to you instead.
Let us know,
Thanks,
laranz.
Yes, there is W3Total Cache enabled. I added your code and it works, thank you very much!
Hi,
Glad we helped. 🙂
Let us know if you have any other questions,
If you’re happy with our service, don’t forget to rate us 5 stars in themeforest. 🙂
Thanks,
laranz.
You must be logged in to reply to this topic.Log in/Sign up