preview perfectly generated but for the very large image, but probably is not the code's fault