In the scald_dnd_library_scald_render function currently first it checks if a file url exists, and if so then that becomes the image path. The problem with that is that some other provider might store a file url in that which should not be put into an img tag, however it can still have a thumbnail source with a file type thumbnail for example.

So for now i switched it around, and first i check if thumbnail transcoded and url is there, and only after the file. This way it is more likely that the img tag will receive a path to an image.

Comments

nagy.balint’s picture

Status: Active » Needs review
StatusFileSize
new1.22 KB

Here is a patch with my workaround.

jcisio’s picture

We also remarked this problem, but the bug is subtle (probably it happens when there is a problem with folder permission, I didn't have time to investigate). But we could simplify it a little more: use only thumbnail/transcoded thumbnail (which is already generated by the library context prerender). No longer needs the file/transcoded file url. And it'd be safe to wait for 1.0 to land this patch.

jcisio’s picture

Status: Needs review » Fixed

Thanks, committed patch #1.

I was in a favor of not to use file source for thumbnail because providers can prepare the thumbnail value. However I committed the patch as is because I think it is indeed safer.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.