updated image preview and markdown preview