[closed] Can i get an example of specifying image dimensions (6 posts)

  1. charlietech
    Posted 3 years ago #

    in gtmetrix.com, i have an F in specifyinf image dimensions. I dont know too much about anything except css so could someone give me an example please? here are some of the codes that need to be specify

    http://cdn.xertionfitness.com/wp-content/themes/suffusion/images/home-light.png (Dimensions: 24 x 24)
    http://cdn.xertionfitness.com/wp-content/uploads/2012/07/Nutritional-info.jpg (Dimensions: 412 x 335)
    http://cdn.xertionfitness.com/wp-content/uploads/2012/07/healthy-spices.jpg (Dimensions: 640 x 250)
    http://cdn.xertionfitness.com/wp-content/uploads/2012/08/biggestloser.jpg (Dimensions: 173 x 125)

  2. s_ha_dum
    Posted 3 years ago #

    It wants you to have height and width attributes, or the CSS equivalent, for those image tags. For example, your avatar on this forum:

    <img style="height:48px; width:48px;" class="photo avatar avatar-48" src="http://www.gravatar.com/avatar/9107bfc60d10714c163099f1653ebede?s=48&d=monsterid&r=g" alt="">

    Here is the info page provided by gtmetrix: http://gtmetrix.com/specify-image-dimensions.html

  3. charlietech
    Posted 3 years ago #

    So basically if the image already have 412 x335 just add the px;?
    If thats true, what if im using a image plugin for the sidebar and it wont allow me to add the px; to the picture, how do i add it then?

  4. s_ha_dum
    Posted 3 years ago #

    Chances are the image doesn't already have anything. It especially doesn't have "412 x 335" because that it invalid markup.

    So, your image plugin is loading full sized images in the sidebar? Not ideal. You can add a rule to your stylesheet and don't need to edit the plugin at all, but that could be tricky given that your image sizes are all over the place. Let me ask this, what size are the images supposed to be when they are displayed on the site?

  5. charlietech
    Posted 3 years ago #

    thanks for replying back. ok i have a feature content slider that is suppose to display images at 640x 250, in my sidebar images i have some images at 173x125 and if i have an ad, i would like to be probably 300 x 260

  6. Michael
    Part-Time Forum Moderator
    Posted 3 years ago #

    you are causing confusion by having two topics open with the same question; I am closing this one because the other one has more replies; apologies to the supporting member ;-)

    please continue with http://wordpress.org/support/topic/specify-images-using-css-block-elements?replies=8

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.