Image Doesn't Show Occasionally
Opened this issue · 2 comments
TLKG commented
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 commented
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.