JSFiddle - React, Tailwind, and code Playground

HTML

<img id="imagem" src="" alt="">

CSS

img {
    opacity: 0;
    transition: opacity 2s;
}

JavaScript

var img = document.getElementById('imagem');
var el = new Image();
img.parentElement.replaceChild(el, img);

setTimeout(function() {
    el.onload = function() {
        this.style.opacity = 1;
    };
    el.src = "http://shotphotos.com/wp-content/uploads/2014/04/Sunrise-with-Green-Field-Landscape-600x375.jpg";
}, 1000);