27 May 2015
Category:
WP Arcade Themes
Comments: 0

GtMetrix: Solve Specify Image Dimensions

For those of you who use GtMetrix, you will commonly notice that all of our themes are not specifying all of the image dimensions. This is a minor speed issue since most of them are sized in CSS which is not detectable, but it does solve the issue.

Take our latest theme MyArcadeTheme you will notice that even though the rating images are specified with CSS they still appear. However, it is safe for us to ignore these images.

The logos, however, are not properly specified and this can be solved fairly easily. In the header.php file you will run across a line of code like this.

<img src="<?php echo $logo['url']; ?>" alt="<?php bloginfo('blogname'); ?>" title="<?php bloginfo('blogname'); ?>" itemprop="image"/>

This code will call the logo that you specify in your theme’s admin panel. To add the image dimensions just change the code to something like this.

<img title="<?php bloginfo('blogname'); ?>" src="<?php echo $logo['url']; ?>" alt="<?php bloginfo('blogname'); ?>" width="245px" height="90px" />

All you need to do from there is change the image dimensions to the logo that you have. Keep in mind that if you want to scale the logo down, resize the logo uploaded that and specify the image dimensions. This will save unnecessary bytes and most of the time the logo looks more natural if resized by you, then to have it scaled down with HTML.

You can apply the same principle on any of the additional logos or image spots that you find in any of our themes, and if you have any questions always feel free to ask for help in our support forums.

Leave a Reply

Read previous post:
MyArcadeTheme - Professional Arcade Theme
MyArcadeTheme v1.0.0 has been released

Today we have some awesome news for you! We have released a new professional theme for MyArcadePlugin. We call it MyArcadeTheme!...

Close