0
Welcome Guest! Login
0 items Join Now

Smartload Image Sizes

    • Teddy's Avatar
    • Teddy
    • Hero Rocketeer
    • Posts: 291
    • Thanks: 0

    Smartload Image Sizes

    Posted 13 years 1 month ago
    • I love the idea of Smartload...both the effect and the fact that it might save me some bandwidth. Unfortunately, I've never had success with it. Consider this code of an image, inserted into my post with Zemanta, noting the explicitly declared height and width in the image tag:
      <div class="zemanta-img" style="margin: 1em; display: block;">
      [caption id="" align="alignright" width="126" caption="Image via Wikipedia"]
      <a href="http://commons.wikipedia.org/wiki/File:Timothy_Franz_Geithner.jpg">
      <img class="  " title="Timothy Franz Geithner, President of the Feder..." src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Timothy_Franz_Geithner.jpg/300px-Timothy_Franz_Geithner.jpg" alt="Timothy Franz Geithner, President of the Feder..." width="126" height="162" />
      </a>
      [/caption]
      </div>

      Without Smartload enabled, Wordpress generates this code and the image is displayed at the desired size:
      <div class="zemanta-img" style="margin: 1em; display: block;">
      <div class="wp-caption alignright" style="width: 136px">
      <a href="http://commons.wikipedia.org/wiki/File:Timothy_Franz_Geithner.jpg">
      <img class="  " title="Timothy Franz Geithner, President of the Feder..." src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Timothy_Franz_Geithner.jpg/300px-Timothy_Franz_Geithner.jpg" alt="300px Timothy Franz Geithner The Economy: Cheerleaders vs. Reality" width="126" height="162">
      </a>
      <p class="wp-caption-text">Image via Wikipedia</p>
      </div>
      </div>>

      With Smartload enabled, however Wordpress generates this code, changing my declared dimensions both to "auto":
      <div class="zemanta-img" style="margin: 1em; display: block;">
      <div class="wp-caption alignright" style="width: 136px">
      <a href="http://commons.wikipedia.org/wiki/File:Timothy_Franz_Geithner.jpg">
      <img class="" title="Timothy Franz Geithner, President of the Feder..." src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Timothy_Franz_Geithner.jpg/300px-Timothy_Franz_Geithner.jpg" alt="300px Timothy Franz Geithner The Economy: Cheerleaders vs. Reality" width="auto" height="auto" smartload="4" style="visibility: visible; zoom: 1; opacity: 1; ">
      </a>
      <p class="wp-caption-text">Image via Wikipedia</p>
      </div>
      </div>

      As you can see, the height and width have been set to "auto" despite my explicit instructions otherwise, and so of course the image loads at twice the size I want it to, breaking my layout.

      Any ideas? Thanks!
    • Ydreece's Avatar
    • Ydreece
    • Newbie
    • Posts: 5
    • Thanks: 0

    Re: Smartload Image Sizes

    Posted 13 years 1 month ago
    • i agree, the smart loader is kinda bugged when loading thumbnails.

      right now the only way you can override smart loader to not break your layout is to specify the excluded css tags on X-Path Ignores on Smart Loader gizmos like .wp-caption (in your case) which is widely used by most WP users. or try to exclude .zemanta-img on your X-Path Ignores and see if it works.
    • Teddy's Avatar
    • Teddy
    • Hero Rocketeer
    • Posts: 291
    • Thanks: 0

    Re: Smartload Image Sizes

    Posted 13 years 1 month ago
    • Ydreece wrote:
      right now the only way you can override smart loader to not break your layout is to specify the excluded css tags on X-Path Ignores on Smart Loader gizmos like .wp-caption (in your case) which is widely used by most WP users. or try to exclude .zemanta-img on your X-Path Ignores and see if it works.

      Unfortunately, the only images on my site are captioned images, so if I exclude them, I might as well turn off Smartload. :) I'm going to disable the "SEO Friendly Images" plugin to see if it's affecting it.

      UPDATE: Nope. Not the culprit.
    • Teddy's Avatar
    • Teddy
    • Hero Rocketeer
    • Posts: 291
    • Thanks: 0

    Re: Smartload Image Sizes

    Posted 13 years 3 weeks ago
    • Anyone? Like I said, if I exclude the affected class, I might as well turn smartload off. :(

Time to create page: 0.049 seconds