@cas-smartdesign/image-tools
v3.4.0
Published
A utility providing placeholder/fallback image loading.
Readme
@cas-smartdesign/image-tools
A utility providing placeholder/fallback image loading.
Public methods
showImageShow a fallback image, then switch it to the actual one when it's completely loaded.
Parameters
elementThe target element. Usually a<div>or an<img>element.srcThe source of the actual image.placeholderSrcThe source of the fallback image.useCssBackground(optional) Whether the image should be used as a CSS background. If not specified, it is autodetected based on the element type.
