Stand-Alone Image Editor
The Stand-Alone Image Editor is an Expression Engine add-on that allows your site's members to upload and manage images in weblog entries from a stand-alone form.
Support can be found in the comments and in this EE forum thread.
Current Version: 1.1 (released 20 August 2008)
* Works with ExpressionEngine 1.6 and higher.
Concept
Stand-Alone Entry Forms are a great way to allow site members to create and edit weblog entries. Unfortunately, the file upload functionality in Stand-Alone Entry Forms is very limited - it simply creates a link that when clicked opens a pop-up window with the file upload screen that you would normally see on the EDIT screen in the EE control panel. This means that members can choose an upload directory and can see other files that have been uploaded. Also, the members must have access rights to the control panel, which you may want to avoid.
The Stand-Alone Image Editor solves this problem by allowing you to upload and view multiple images to a weblog entry, to delete individual images, and to limit the number of images that can be uploaded.
Find out more about Stand-Alone Entry Forms in the online documentation
How It Works
The Stand-Alone Image Editor uploads images that are in accordance with your file upload preferences, such as allowed file types, maximum dimensions and file size, etc., to the specified upload directory. It stores the names of the uploaded files in a custom weblog field.
Case 1: Upload images from a Stand-Alone Entry Form
To allow your site members to upload images from a stand-alone entry form, place the following code in your template:
<input type="hidden" name="upload_field" value="my_upload_field" /> <input type="hidden" name="upload_destination" value="my_upload_destination_id" /> // optional <input type="file" name="file1" /> <input type="file" name="file2" /> <input type="file" name="file3" />
Change my_upload_field to the custom field name that you want the images to be stored in.
Change my_upload_destination_id to the id of the upload destination that you want to use, or leave it out to use your default settings.
You can have as many file input fields as you want, just make sure that they all have different names.
Here is an example of using this in a stand-alone entry form:
{exp:weblog:entry_form weblog="articles"}
<input type="hidden" name="upload_field" value="images" />
<input type="hidden" name="upload_destination" value="2" /> // optional
Title: <input type="text" name="title" /><br/>
<input type="file" name="file1" /><br/>
<input type="file" name="file2" /><br/>
<input type="file" name="file3" /><br/>
{/exp:weblog:entry_form}
Case 2: Upload or delete images from a Stand-Alone Edit Form
You can also allow your site members to upload or delete images from a stand-alone edit form. In other words to an existing weblog entry.
The module provides you with the code to display the images that have been uploaded for the current weblog entry. Each image has a "delete" button beneath it that removes the image from the entry (it does not delete the image from the server). If the number of images in the weblog entry is less that the upload limit then an upload button is also displayed.
To display the image editor, place the following code in your template:
{exp:image_editor:display entry_id="16" max_images="3" field_name="my_upload_field" upload_destination="1"}
The entry_id parameter is required, and specifies the weblog entry to upload the images to.
The max_images parameter is optional, and specifies the maximum number of images that can be uploaded for this weblog entry. The default value is 3.
The field_name parameter is optional, and specifies the name of the custom weblog field that holds the names of the uploaded images. The default value is "images".
The upload_destination parameter is optional, and specifies the id of the upload destination to which the image should be uploaded. The upload destinations can be found at Admin -> Weblog Administration -> File Upload Preferences. Default value is 1.
It will often be useful to place the call to the Stand-Alone Image Editor within a weblog entries tag in order to get the entry_id:
{exp:weblog:entries weblog="articles" author_id="CURRENT_USER" limit="1"}
{exp:image_editor:display entry_id="{entry_id}" field_name="my_images"}
{if no_results}
You have not published any articles yet
{/if}
{/exp:weblog:entries}
The Stand-Alone Image Editor does not create thumbnails when uploading images. To create the thumbnails using css, put the following sample code in your stylesheet:
.image_editor_thumb img {
width: 144px;
height: 90px;
}
Case 3: Get the images from the weblog entry
Since there can be multiple images in a single field in a weblog entry, use the following tags to get the individual images (again entry_id is required).
{exp:image_editor:images entry_id="16" field_name="my_images" upload_destination="1"}
<img src="{image_source}" />
{/exp:image_editor:images}
This will loop through all of the images that have been uploaded to this entry. The variable image_source returns the full url of the image.
Note:
Some people have encountered issues when trying to upload multiple files. A reported solution is to turn off XSS Filtering by going to:
Admin > System Preferences > Security and Session Preferences > Apply XSS Filtering to uploaded files?
Installation
Download and unzip image_editor.zip, then follow the steps below:
- Upload the image_editor folder to the system/modules folder
- Upload lang.image_editor.php to the system/language/english folder
- Install the Image Editor module (Control Panel -> Modules -> Install)
- Upload ext.image_uploader.php to the system/extensions folder
- Enable the Image Uploader extension (Control Panel -> Admin -> Utilities -> Extensions Manager -> Enable)
Download
Each individual license costs $29.95, which allows you to use the module on one installation of EE. You must purchase a license in order to download the Stand-Alone Image Editor. Once you have completed payment you will be sent a code that will allow you to download the file.
By purchasing the Stand-Alone Image Editor you agree to the license agreement.
If you have already purchased the Stand-Alone Image Editor then you can download it by entering your email and code below.
License
By purchasing the Stand-Alone Image Editor you agree to the following conditions:
- One license grants the right to perform one installation of the Stand-Alone Image Editor. Each additional installation requires an additional purchased license.
- You may not reproduce, distribute, sell or transfer the Stand-Alone Image Editor, or portions thereof, to any third party.
- All copyright and proprietary notices within the Stand-Alone Image Editor files must remain intact and unaltered.
- The Stand-Alone Image Editor is provided "as is", without warranty of any kind.
- You assume all risk associated with the installation and use of the Stand-Alone Image Editor.
Changelog
Version 1.1
- Fixed error reporting bug that was encountered when file upload preferences were not satisfied








Comments
Don
10 December 2007
Question: is there a way with this module to limit a user's ability to upload to only one image?
Ben
10 December 2007
hi don. if you want to limit to one image in an entry form then just use one file input field.
if you want to limit to one image in an edit form then use the parameter max_images="1" as described above.
hope this helps
Corey Snipes
24 December 2007
Heya, I encountered some div wierdness in image_editor:display. It appeared the output was producing too many new divs. I addressed it by changing the DIV tags to /DIV @ lines 165 and 190 of mod.image_editor.php. Hope it helps!
Ben
26 December 2007
hi corey, the divs are added for easy styling. sounds like you figured out the solution for your particular case, thanks for posting it!
Simon Rudkin
22 January 2008
Fantastically useful addition...! Anyway to make it respect the maximum image and files sizes in a neater way? At the moment it seems to just ignore any images above the limits, and bypass the standard EE message.
Ben
30 January 2008
hi simon, not at the moment but i will definitely add this in the next release. thanks for the suggestion.
Zac
18 February 2008
Great module. Is there a way that it can be used for more than one field in one entry? When I try to do this it uploads the image to the second of upload_field.
Ben
18 February 2008
hi zac, i'm afraid it's not possible to do it on the same form. if you had two sepereate forms with one field in each then it would work, otherwise i'm afraid not.
Zac
18 February 2008
Thanks Ben. Do you think there is a way then to somehow submit the form upon uploading one image then use ajax to refresh the page to an edit page and have it ready to upload to another field... like a two step process?
Ben
18 February 2008
you could do this simply with the return parameter in the SAEF
Shawn
24 April 2008
Ben... a cool feature would be some type of upload progress bar. Like one that sparkles and turns your cursor into a butterfly. Ok, maybe not the sparkles and butterflies, but an upload bar would be a great addition!
:)
Ron van der Plas
13 May 2008
I purchased SA Image Editor but it is unclear which code I have to enter. I tried both: the transactionnumber and the number of the delivery. Since I can't find an e-mail/support I use the comments to get in touch.
Simon Rudkin
23 May 2008
Hi! Any news on some support for maximum file size? Be super-useful!
carl schulz
19 June 2008
ben,
so i read that you can't post to more than one field using this module. Im trying to get functionality to post up to 9 files on one form. Is there a limit for this? I can't seem to submit any more than 3 or 4 files. it just kicks into a blank screen. (I have turned up the character count limit on the field its going into.) Any ideas?
Ben
19 June 2008
hi carl, try making sure that the maximum image and files sizes are in accordance with those of the upload destination. that might be causing the blank screen.
Steve Crofts
26 June 2008
I need to setup a member profile system for a client and think I will be using the solspace user module, however one requirement is that the member can upload 3 images (max) about their business, does your module work with the user module?
Cheers
Steve
Ben
26 June 2008
hi steve, i haven't used that particular module so i'm afraid i can't say for sure. if you try it and it doesn't work for you then i would refund you no problem.
Simon Rudkin
03 July 2008
Quick bump on some support for maximum file size??? Cheers!
padwan
18 July 2008
Mate, your site is not XHTML valid, you've got a lot of errors (60+) and thats mostly due to the fact that you have a selector called admin_comment - you should make this a .class
Lakeshia
27 July 2008
I'm interested in buying this module. But i would like to see demo of the form before i buy it. Just to make sure it has the functionally I'm looking for. Do you have any websites url that are using your module.
cberlean
11 August 2008
hello,
I installed the module and followed the instructions to a t, but for some reason the files aren't getting uploaded at all. Any ideas?
Ben
11 August 2008
cberlean: can you make sure that the upload destination you are using is working from the EE file uploader please. perhaps the directory is not writable...?
lakeshia: i'm afraid i haven't got a public demo available, if anyone else can offer a url then that would be great!!
Adam
19 August 2008
I am a bit confused as to whether this add-on honors the max file size preference of EE's file upload preferences. IN the comments here and in the EE forums, it seems that it does not, however, on this page it says:
"The Stand-Alone Image Editor uploads images that are in accordance with your file upload preferences, such as allowed file types, maximum dimensions and file size..."
Can you please clarify this? Thanks.
Ben
20 August 2008
the latest version, 1.1, now strictly honours the file upload preferences, including max file size.
Leave A Comment