lazyload-rails icon indicating copy to clipboard operation
lazyload-rails copied to clipboard

Lazyload wont work on aws s3 hosted images

Open gabrielboeker opened this issue 7 years ago • 6 comments

title pretty much says it all. the grey square will stay if you try to apply the lazyload helper on dynamic images like

<%= image_tag(@post.image1, lazy: true) %>

images are stored via paperclip on aws s3.

gabrielboeker avatar Jan 24 '18 17:01 gabrielboeker

Any update on this?

redlightmikey avatar Sep 21 '18 15:09 redlightmikey

no, unfortunately its not possible to lazyload external hosted images

gabrielboeker avatar Sep 27 '18 07:09 gabrielboeker

Has anyone had any luck with S3 hosted images? or any update here? Thanks

jamesachilles avatar Mar 05 '19 03:03 jamesachilles

no luck either, has anyone know of an alternative or work around ?

petitkriket avatar Jul 15 '19 11:07 petitkriket

use a different library. the gem is pretty neat except of that.

gabrielboeker avatar Jul 15 '19 12:07 gabrielboeker

have you initialized your lazyload(); on this?

I believe you need this to trigger it so it would "lazyload" your images.

just wondering what would be the compiled version of <%= image_tag(@post.image1, lazy: true) %>

I was just thinking @post.image1 would return some sort of url right?

roaldjap avatar Apr 29 '21 22:04 roaldjap