I am facing this strange issue on some ios devices. The problem is that some images are displaying entirely while some are rendering only partially like half or even less, but when I open the same site on some other ios device or any android device, it is rendering fully. Not sure what's the issue. Btw I am adding images to the DOM via JavaScript as I am receiving them through an API. Also, I noticed that this issue only occurs for the starting images and not on the ending images! In total there are like 6 images. Please find attached the screenshot.
The starting 2 images as you can see are less than half rendered and the later ones are fully rendered. Also, from dev tools when I hover over the image src, it is showing the complete images so which confirms that there is some issue on the frontend side. Kindly help me with this!
This is the code for adding images:
overlayData.overlays.forEach((overlay) => {
let thumbnail = document.createElement("img");
thumbnail.className = "swiper-slide canvas-edit-thumbnail overlay";
thumbnail.src = overlay.image;
thumbnail.addEventListener("click", () => {
overlayImgPreview.style.display = "block";
overlayImgPreview.src = thumbnail.src;
overlayAdded = true;
});
overlayThumbnails.appendChild(thumbnail);
});
Via Active questions tagged javascript - Stack Overflow https://ift.tt/xBONLhq

Comments
Post a Comment