Community Forums › Forums › Archived Forums › General Discussion › Specify Image Dimensions & Remove Query Strings in Lifestyle Pro
Tagged: GT Metrix, image dimensions, images, lifestyle Pro, Query Strings
- This topic has 7 replies, 3 voices, and was last updated 9 years ago by au79.
-
AuthorPosts
-
March 11, 2015 at 8:26 am #144006au79Member
Hello everyone,
I am a total newbie (just purchased the framework a couple of weeks ago) and am loving it so far. I've been testing my site speed on GT Metrix and can't figure out how to change a couple of things to improve my score.
Apologies in advance if this is too many questions at once.
1) I'm using the Genesis Responsive Slider plugin and hard-coded the image dimensions into the plugin file, but this will make updating a bit of a hassle. Is there a way I can set this in functions.php so I won't have to do this whenever there's an update?
2) I'm also taking a hit on "Specify Image Dimensions" with the featured post images. I have featured images set to the 'home-small' size but the theme isn't outputting the image dimensions.
3) The images are generating a "resize" query string at the end of each image in the Responsive Slider as well as the post images. I have the "Remove query strings from static resources" plugin, but it's not doing anything for these images.
I would very much appreciate any insights on how to go about fixing these issues. Thank you for reading my post.
http://www.aloeverymuch.comMarch 11, 2015 at 12:17 pm #144058Victor FontModeratorThis will specify the image dimensions for the slider:
<script> jQuery(document).ready(function ($) { $(".slide-image").children().children().attr('height', '375px'); $(".slide-image").children().children().attr('width', '960px'); }); </script>
I can't help you any further because it appears you have right click turned off for your site.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?March 11, 2015 at 5:28 pm #144100au79MemberHi Victor,
Thank you for the response and I apologize about the right-click issue (I forgot to disable the plugin when I posted here).
I tried putting the script you posted in the wp_head section for the Genesis theme setup, but it's still not outputting a width="" and height="" attribute on the slide images. Is that what the script is for? Sorry if I wasn't clear in my post; it was way past my bedtime.
Thanks again for responding.
March 11, 2015 at 5:51 pm #144101Victor FontModeratorThat's exactly what that script does. I use it in the footer on my sites. You have to adjust the size for your site.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?March 11, 2015 at 5:54 pm #144103au79MemberThanks, Victor. My caching plugin (and maybe Cloudflare) must have been keeping me from seeing the changes.
March 11, 2015 at 11:53 pm #144126au79MemberIn case anyone else is looking for an answer to this, I've discovered that the query strings and missing dimension attributes are a result of the Photon extension (from Jetpack). As Photon speeds up my site a lot, I'll just leave it as is.
Thanks again.
April 18, 2015 at 5:09 pm #148382tellieParticipanti have the same issues with Whitespace theme (all featured post images are exactly 720x300 as recommended but not outputting a width=”” and height=”” - and also taking a speed hit on "images are generating a “resize” query string." I had same issues with Executive Pro. Gmetrix scores suffer. Any suggestions?
April 18, 2015 at 8:39 pm #148390au79MemberSo far the only thing that works for me is hard-coding my image dimensions into line 342 in genesis-responsive-slider.php, but this means if there's a plugin update I'll have to re-do it.
I'm not sure why Victor's solution doesn't work on my sites.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.