Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Setting Size Attributes: Width & Height

by

Tips and Tricks HQ Support Portal › Forums › WP Lightbox Ultimate › Setting Size Attributes: Width & Height

Tagged: set attributes, set image size attributes, Setting Size Attributes, Size Attributes, width height

  • This topic has 8 replies, 2 voices, and was last updated 12 years, 2 months ago by Hazard.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • February 23, 2013 at 2:59 pm #8627
    Hazard
    Member

    I am using wp_lightbox_prettyPhoto_image

    I would like to know how to set Size Attributes (ie width=”355″ height=”200″) to the image that are embedded in my posts. The image is in fact w355 h200, and the purpose of this is to optimize my site for google page speed.

    I have tried using the way I would do it ordinarily in HTML, but the attributes do not end up in on the site when after I publish.

    Please let me know, thanks!

    John T

    [http://www.aquariumcarebasics.com/]

    February 23, 2013 at 4:03 pm #54024
    Hazard
    Member

    Here is what I am using in my post:

    [wp_lightbox_prettyPhoto_image link="http://www.aquariumcarebasics.com/aquarium-pictures/o-ring-sizes.jpg" img class="alignleft size-thumbnail wp-image-83" description="Always keep a couple spare O Rings on hand in case of a filter emergency." source="http://www.aquariumcarebasics.com/aquarium-pictures/o-ring-sizes-355x200.jpg" title="O Rings Come In Many Different Sizes"]

    And no matter where I put width=”355″ height=”200″ the attributes do not make it into the webpage.

    Any insights would be appreciated!

    February 23, 2013 at 10:44 pm #54025
    wpCommerce
    Moderator

    Hi, by “embedded image” do you mean the shortcode anchor image or the image that will pop up in lightbox?

    If you want to resize the anchor image please follow the instructions on this post:

    https://support.tipsandtricks-hq.com/forums/topic/lightbox-ultimate-anchor-image-size

    February 26, 2013 at 1:25 pm #54026
    Hazard
    Member

    I am trying to set the dimensions for the anchor image that appears on the website that a visitor clicks on NOT the image that opens up in the pop-up window.

    When I place width=”355″ height=”200″ in the code those attributes do not make it into the site when published.

    Thanks in advance!

    John T

    [http://www.aquariumcarebasics.com/]

    February 26, 2013 at 10:25 pm #54027
    Hazard
    Member

    I followed the instructions in this link but it did not work.

    For some reason I cannot get the attributes to work with the shortcode.

    I CAN set size attributes when I hardcode with < >, but the syntax does not work from within the [ ] of the shortcode.

    Any insight would be appreciated.

    Thanks!

    February 26, 2013 at 10:36 pm #54028
    wpCommerce
    Moderator

    Hi, can I have a look at your shortcode after the changes you have made?

    Please create a separate page with just one shortcode so I can see what is actually happening.

    February 28, 2013 at 5:32 am #54029
    Hazard
    Member

    Here is the test page:

    [http://www.aquariumcarebasics.com/special-thanks/]

    And here is the shortcode:

    [wp_lightbox_prettyPhoto_image link="http://www.aquariumcarebasics.com/aquarium-pictures/00-720-405-placeholder.jpg" img class="alignleft size-thumbnail wp-image-24" description="INSERT DESCRIPTION" source="http://www.aquariumcarebasics.com/aquarium-pictures/00-720-405-placeholder-355x200.jpg" width="355" height="200" title=" INSERT TITLE"]

    When I use firebug to check out what is on the webpage, the width and height are not set. And I get this suggestion from GT Metrix:

    The following image(s) are missing width and/or height attributes.

    [http://www.aquariumcarebasics.com/aquarium-pictures/00-720-405-placeholder-355×200.jpg] (Dimensions: 355 x 200)

    Any insights would be appreciated!

    Thanks!

    February 28, 2013 at 10:51 pm #54030
    wpCommerce
    Moderator

    Hi, you are doing it wrong. The link I shared explains how you can use the img_attributes parameter in the shortcode to apply HTML attributes to an anchor image. please use the shortcode like the following:

    [wp_lightbox_prettyPhoto_image link="http://www.aquariumcarebasics.com/aquarium-pictures/00-720-405-placeholder.jpg" description="INSERT DESCRIPTION" source="http://www.aquariumcarebasics.com/aquarium-pictures/00-720-405-placeholder-355x200.jpg" img_attributes='width="355" height="200"' title="INSERT TITLE"]

    March 1, 2013 at 4:20 am #54031
    Hazard
    Member

    Hey, it worked! I cant thank you enough! Great plugin and great support!

  • Author
    Posts
Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ