Coder Social home page Coder Social logo

maxisam / ngx-progressive-image-loader Goto Github PK

View Code? Open in Web Editor NEW
35.0 3.0 6.0 14.38 MB

lazy load img/picture, prevent reflow and seo friendly.

License: MIT License

JavaScript 9.15% TypeScript 74.15% CSS 3.57% HTML 13.13%
lazyload image-lazy-load angular progressive-image lazyload-images

ngx-progressive-image-loader's People

Contributors

duxor avatar maxisam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ngx-progressive-image-loader's Issues

NgxWindowTokenModule issue

Plugin is awesome!
There is however an issue with the ngx-window-token plugin you depend upon. It only works with the 1.0.2 version and not the newest, could you maybe update your code to make it work with the newest version?

Thank you, and again very cool plugin

Universal issue

Hello again 😄!

I have this error while serving the app built with Angular Universal:

Error: StaticInjectorError(AppServerModule)[ProgressiveImageDirective -> InjectionToken WindowToken]: 
  StaticInjectorError(Platform: core)[ProgressiveImageDirective -> InjectionToken WindowToken]: 
    NullInjectorError: No provider for InjectionToken WindowToken!

any ideas?? I'm importing the last version in beta (7).

Possible to use a flexible imageRatio (none stretch)

I try to use progressive images to load thumbnails which can be at any aspect ratio. Before using ngx-progressive-image-loader I was able to implement this successfully with Flexbox.

` .thumbnailContainer {
flex: 2 ;
overflow: auto;
position: relative;

}
img {
position: absolute;
top: 0; bottom:0; left: 0; right:0;
margin: auto;
max-width: 100%;
max-height: 100%;
}`

<div class="thumbnailContainer" fxLayout="column"> <img src="{{ThumbnailLink}}" /> </div>

My code matched to the lib looks like this. Unfortunately it doesn't work because the images get stretched to a specific aspect ratio

<ngx-progressive-image-loader class="thumbnailContainer" fxLayout="column" > <div class="thumbnailContainer" fxLayout="column"> <img [src]="slide.SlideThumbnailLink" alt="" ngxProgressiveImage /> </div> </ngx-progressive-image-loader>

Thank you very much for help in advance.

ModuleWithProviders Error

Hi,

I am experiencing the following error in Angular(v10.0.14) library project:

node_modules/ngx-progressive-image-loader/lib/ngx-progressive-image-loader.module.d.ts:6:51 - error TS2314: Generic type 'ModuleWithProviders' requires 1 type argument(s).

6 static forRoot(config?: IImageLoaderOptions): ModuleWithProviders;

Need for include scss

Hello!

Nice job !!

Just a question, why do we need to include some sass styles? Should not be enough import the module? It's just that I want to use it in a cleaner way ...

Thanks and best regards

How is memory usage handled for image resizing

First: Thanks for the great repo.

I have a question regarding memory usage when loading images via this library AND using the max-width/height options in your excample.

Suppose I'm loading a 2000x2000 pixel image with the 200x200 option with maximum width and height. Is the large image kept in memory and only scaled or is a 200x200 image created and the large image deleted?

thank you very much for help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.