Generating template images procedurally instead of loading textures let numberimgs for let i 0 i 30 i let canvas document createElement canvas canvas width 20 canvas height 20 canvas style position absolute canvas style left 0px canvas style top 0px canvas style display none const ctx canvas getContext 2d ctx font 15px Arial ctx textAlign left ctx textBaseline top change baseline property ctx fillText i 0 0 document body appendChild canvas let dataURL canvas toDataURL numberimgs i number i url dataURL canvas canvas for let i 0 i 30 i let div document createElement div div style width 40px div style height 40px document body appendChild div div style background image url numberimgs i url div style background size cover div style border 1px solid blue div style display inline block console log ready
ndChild canvas let dataURL canvas toDataURL numberimgs i number i url dataURL canvas canvas for let i 0 i 30 i let div document createElement div div style width 40px div style height 40px document body appendChild div div style background image url numberimgs i url div style background size cover div style border 1px solid blue div style display inline block console log ready