Provide getDataUrl method for previews