whackashoe / antimoderate

The progressive image loading library for great good!
1.51k stars 108 forks source link

support (plugin) #11

Closed alejokum122 closed 8 years ago

alejokum122 commented 8 years ago

Hi.

the plugin looks impressive, but I would like to see a more concrete example on the operation. I don't understand how to use this plugin. When the base64 image is shown and when is hidden? whom control this status? me or this plugin does that?

whackashoe commented 8 years ago

The base64 image is shown until the full sized image is loaded, then they are swapped. Future reloads of the page you wont see the base64 (unless cache is disabled).

alejokum122 commented 8 years ago

is necessary use the base64 image?

whackashoe commented 8 years ago

It's necessary for antimoderate to work, yeah. Otherwise you wont get the blurry image.

sunstorymvp commented 8 years ago

actually not. it works well with just paths to images

whackashoe commented 8 years ago

@sunstorymvp I don't follow. What do you mean?

sunstorymvp commented 8 years ago

I mean that this is enough:

<img src="/images/image.jpg" data-antimoderate-idata='/images/image_small.jpg'  style="..."  />

It is optional to encode small image to base64, because idata argument just passed to src: https://github.com/whackashoe/antimoderate/blob/master/antimoderate.js#L248

it can be any valid src

whackashoe commented 8 years ago

Aha, you are right! :+1: Thanks