Revert "Revert "removed dataURL support for preview generation""

This reverts commit 9cd481be4513542485eac97641a76e2bed275544.