Support » Fixing WordPress » Specify image dimensions

  • Resolved Lollygreen

    (@lollygreen)


    I am having problems getting my head round how to do this.

    My website is: strategic

    And GTMetrix tells me that I have 6 images that are missing width and/or height attributes.

    For example:http://strategicwebsite7.com/wp-content/uploads/2014/01/slide1-940×300.jpg (Dimensions: 940 x 300)

    I thought since it says 940×300 after it that it does have its width and height but apparently not.

    Can someone tell me how I change this as I have more images to add to the page and so far everything I add says the same.

    In case you ask I don’t know what .php I have but with hostgator shared hosting.

    Have got firebug but don’t really understand what to do with it.

    Please help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Lollygreen,

    what you see there as “-940×300” is just an indication that a custom thumbnail size was loaded, which was specified by the theme and generated by WordPress.

    http://codex.wordpress.org/Function_Reference/add_image_size

    What GTMetrix means are HTML image attributes which need to be added. Image attributes are additional information to specify the image size. You can read more about that here: http://www.w3schools.com/tags/att_img_width.asp

    If you want to add these attributes, you will need to edit the code because the images are displayed dynamically. If you don’t know how to edit the files, or which files you need to edit, please ask the theme developer for help. He also might want to include this in a future update because it makes sense anyway.

    Regards
    Michael

    Thread Starter Lollygreen

    (@lollygreen)

    Thank you so much that makes sense now to me, lol, I will stop trying to do it the way I thought.

    I am going to just pay someone on eLance to teach me how to do it, might as well learn it I do basic html anyway and css.

    I will have a read of the links, thanks for those.

    Thanks gain.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Specify image dimensions’ is closed to new replies.