After inserting an image into a text area, the src attribute includes the domain name as well as the local file path. For example:
src="http://mysite.staging.example.com/files/myimage.jpg"
This can be problem when the domain changes, such as when moving from staging to live.
I'm thinking that the best src attribute would omit the domain completely. For example:
src="/files/myimage.jpg"
But I'm not sure if it should include the initial slash.
I suppose there might even be a configuration option that I'm missing, but I haven't found it yet. Is there? If not, I'd like to request a configuration option that allows the admin to choose whether the full domain should be included.
Comment | File | Size | Author |
---|---|---|---|
#3 | 887442_insert_readme.patch | 1005 bytes | nadavoid |
Comments
Comment #1
quicksketchPlease search first.
#880016: inserting with imagecache creates an absolute path
#622964: Provide UI option for using relative urls for the inserted images
#640352: Linking with relative paths
#521812: relative path or full path settings
Comment #2
nadavoid CreditAttribution: nadavoid commentedThanks for the links. I did search first, but now I realize I was only searching *open* issues. Oops.
Comment #3
nadavoid CreditAttribution: nadavoid commentedThank you for enabling this setting on an already super module.
Would you consider adding some or all of the attached README.txt patch? I added a note about the variable to add in settings.php, and fixed a couple of small typos.
Proposed new text:
I set the status back to "needs review." Was that the right status to use for this?
Comment #4
quicksketchThanks, this sounds like a great idea. Perfect patch too. I committed this to both branches of Insert. Thanks!