Revert "removed dataURL support for preview generation"

This reverts commit 3c4408542647cb04211b2a98255ae3c4fcb6cae1.