Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image Doesn't Show Occasionally #84

Open
TLKG opened this issue Apr 28, 2021 · 2 comments
Open

Image Doesn't Show Occasionally #84

TLKG opened this issue Apr 28, 2021 · 2 comments

Comments

@TLKG
Copy link

TLKG commented Apr 28, 2021

Started experiencing image-no-show a few weeks ago. Meanwhile no error output in VS' PROBLEMS, TERMINAL, OUTPUT and DEBUG CONSOLE.

<lib-ngx-image-zoom [thumbImage]=mythumb [fullImage]=mythumb [magnification]="1"
            [enableScrollZoom]="true"
            [enableLens]="true"
            [lensWidth]="200">
        </lib-ngx-image-zoom>

mythumb is populated with a relative path plus file name from database, for example /img/abc, abc is the file name without extension. When it occurs,

  • F12 verifies it's in the source like <img _ngcontent-emo-c230="" class="ngxImageZoomThumbnail" src="/img/abc">
  • open up Paint, drag it over to confirm it's valid and showable.
  • back to application, pull up the same record, it shows this time

Wouldn't it be caused by no extension?

@r0754497
Copy link

Check the height and width of the img element in your browser. I had a similar issue where the width was 0. Fixed it by using the onImagesLoaded event to resize the image once it has been loaded.

@husainsr
Copy link

@r0754497 How would you solve this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants