Closed (fixed)
Project:
Image Resize Filter
Version:
7.x-1.16
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Apr 2015 at 19:03 UTC
Updated:
8 Aug 2018 at 08:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ram4nd commentedComment #2
joelstein commentedI agree. Otherwise, if you try to resize a URL like "/modules/file/icons/application-pdf.png", and you've got Media Vimeo installed, you get a scheme like "vimeo://".
Fixing this would probably also fix #1207116: Image Resize Filter may create broken paths if height/width attributes are not available.
Here's a patch which will only match the stream wrapper if its directory path matches that of the file. Otherwise, it will fall back to "public://".
Comment #3
adamps commentedI confirm that the patch fixes #1207116: Image Resize Filter may create broken paths if height/width attributes are not available. Arguably the two issues are duplicates. The other was opened much earlier, has a lot more subscribers and has a clearly described repro scenario.
@joelstein Maybe you could close this one as a duplicate, and move your patch over there?
Comment #4
Anonymous (not verified) commentedThe patch would not install on my end, maybe it was developed against an old version.
Here is the corrected patch.
Comment #5
svenryen commentedI used the patch in #4 and it resolved my issue. I had old image links in my markup from a past domain, so when the image path was
sites/old.domain.com/files/blah, the module would output an empty src for the image.With the patch applied, both cases of image urls like
/sites/old.domain.com/files/blah.jpgand/sites/default/files/blah.jpgwould be resized properly, and I no longer see any empty src attributes.Comment #7
ram4nd commented