_createImage(source) {
        // create a new image element if the source specified is a string
        // or if the crossorigin attribute is not specified (avoid potential CORS errors)
        if(typeof source === "string" || !source.hasAttribute("crossOrigin")) {
            const image = new Image();
            image.crossOrigin = this.crossOrigin;
            if(typeof source === "string") {
                image.src = source;
            }
            else {
                image.src = source.src;
                source.hasAttribute("data-sampler") && image.setAttribute("data-sampler", source.getAttribute("data-sampler"));
            }
            return image;
        }
        else {
            // else return source directly to avoid reloading the image
            return source;
        }
    }
Create an image HTML element based on an image source url

     params:
     @source (string): source url

     returns :
     @image (HTML image element): an HTML image element
*