I recently launched a client's site and in the process all the file upload directory paths had to be changed. I noticed afterwards that images inserted in Wygwam fields were all broken. It seemed like normal behavior, as Wygwam inserts HTML source code in the field.
If it's not expected behavior, I'd like to know...but if it is, I am wondering:
Is there a way to get Wygwam to tell CKEditor to use the EE path variable for the file upload directory (e.g. "{filedir_4}thumbs/465-Fairchild-225x300_thumb.jpg") so that all the image src URLs get updated with path updates in the EE system?
I looked at the documentation for CKEDITOR.config, but I couldn't find anything. I realize this might be a question for the CKEditor forum. Thanks for any tips and guidance.
Help get this topic noticed by sharing it on
Twitter,
Facebook, or email.
Twitter,
Facebook, or email.
how to get images in Wygwam fields to use EE path variable for file upload directory in img src?
-
I have a website where I've installed WYGWAM and replaced the default text area field for 'Body' with the WYGWAM field. Client has uploaded a lot of content using the 'Upload File' function, thus there are many img tags within the Body field which no longer render the {filedirx} url.
Here's an example of an image when you view the Source of the WYGWAM field:
<img border="0" height="600" src="{filedir_4}P1050995.JPG" width="800" /> -
-
I got this answer from Brandon Kelly on Twitter:
Just download the latest version of FieldFrame from GitHub (http://github.com/brandonkelly/bk.fie.... It has an update which fixes this problem.-
Correct link to GitHub http://github.com/brandonkelly/bk.fie...
-
-
-
-
-
Thanks Sara, much appreciated. I had a look at the problem again and now moving all the images into their own gallery field using Matrix. A lot of work, but in the end I can control look and behaviour of the images much better.
Cheers
Brendan -
-
I don't think the proposed solution will work for Wygwam 2.0 though wil it?
-
-
-
*What* worked just fine? Field Frame isn't used in 2.0. What did you do/configure to make it pickup the {file_dir X} tag?
-
-
-
-
-
>>"Just download the latest version of FieldFrame from GitHub"
Tried using the revised Github link to download the updated FieldFrame version, but - and not knowing how to use Github - just clicking the link just drops me on my Github homepage. How do I download? -
-
I noticed that when I upload files in Wygwam, it spits out absolute URLs, how are you guys getting it to even spit out EE path variables?
-
-
Brandon, It looks like a solution for 1.x has been posted via Sara Eick McAllister, but there's nothing here for EE 2.0.
I'm using a staging server and need the EE path variable to work if Wygwam to by useful for my current project. Even if I manually insert an EE path variable that works in a standard field, Wygwam doesn't process it. Is there a setting in CKEditor’s config settings I need to change? Please advise. -
-
Wow, sorry guys, I completely missed this thread initially (I only get email notifications for threads I've actually responded to).
So, currently Wygwam has zero support for {filedir_X} variables. They only "work" in EE1 in that EE will still parse them on the template end; you’d still get blank images in the field itself. This actually should be the case in EE2 as well.
But I can see the case for supporting them, so I'll look into it. -
-
You can use the EE typography plugin to wrap the wygwam output- that will convert the {filedir_X} format.
-
Loading Profile...







EMPLOYEE
