This question is different because I'm asking between two distinct codes.
If you had to choose between these, which would you choose and why?
1st:
<script>
var preloadImg = new Image(266, 266);
preloadImg.src = 'http://via.placeholder.com/266x266';
</script>
2nd:
<img src="http://via.placeholder.com/266x266" style="display: none;">