Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Reviewing Silverstripe - Image upload and resize


Go to End
Reply

11 Posts   5873 Views

Avatar
Myles

7 January 2009 at 10:08pm Community Member, 6 Posts

Hi,

I'm reviewing Silverstripe for use in the NHS (national health service) in the UK.

I'm concerned about simplicity for users and performance, so I'm testing out the resize image functions on a few different opensource CMS's. This, Joomla, Drupal, maybe one other.

I tried the standard files and images tab. Worked OK, but was sad that you couldn't specify the pixel size manually and rather had to drag the corner anchors which could take half a dozen attempts to nail the correct pixel width.

Ideally I would like something akin to the facebook image uploader (I know its a java clientside thing), but I could imagine lots of instances where users are trying to upload 3, 5, or 10mb images up for the intranet/internet. This might kill our bandwidth and server-space.

Is there a module that has a client-side resizing tool? So we could limit images to a max of say 600px wide or high...

I thought I saw mention of a flash uploader too.

thanks,

Myles

p.s. the right-hand side image uploader failed to do anything when I clicked the 'upload' link. Tested FF£ and IE7.

Avatar
UncleCheese

8 January 2009 at 3:47am 4085 Posts

My SWFUpload module coupled with Silverstripe's image handling could really help you out. You can read more about image handling in the SS docs, but the basic idea is this..

Any image can have a number of formatting functions run on it at the template level. For instance:

<% control MyImage.SetWitdth(100) %>
<% control MyImage.CroppedResize(250,400) %>
<% control MyImage.PaddedResize(300,800) %>
<% control MyImage.FittedResize(640,480) %>

etc..

The beautiful thing is that once these functions are run once, the image is saved and cached in the filesystem, so there are huge performance gains after the first load. Also, should you ever want to change the method of resize or the dimensions of the resize, you always have your original image available, and SS will handle it. If you change a resize from 100x100 to 600x600, for instance, provided the original image was large enough, your template will get updated without any loss of quality.

You can read more about this in the docs. For more robust image handling you can subclass the Image class and do some cool custom stuff.

As far as the Flash-based uploading, the SWFUpload module allows bulk, asynchronous uploading through your website and CMS. Let me know if you need more info on that.

Avatar
Myles

8 January 2009 at 4:30am Community Member, 6 Posts

Thanks Uncle Cheese

It says in the 2.2 release notes:
Added SWFUpload library as default method of uploading files

I presume that's the multiple file upload that I used earlier, but looking at it again I can't see any flash in that page, just looking at the uploadiframe page-source.

??? cheers

Myles

Avatar
UncleCheese

8 January 2009 at 4:47am (Last edited: 8 January 2009 4:48am), 4085 Posts

I don't know anything about SWFUploadbeing in 2.2. It certainly isn't in 2.3. I know it was around for a while but it was incredibly buggy, so they got rid of it. Where did you see it?

Avatar
Myles

8 January 2009 at 7:06am Community Member, 6 Posts

Well if SWFupload is buggy - what are the alternatives - if any?

I just installed Joomla Flash Uploader and inmho it's mint. So looking for an equivalent in SS now.

I'm on SSv2.2.3 as that was the recommended stable release this week. we have to choose a cms and launch in a short space of time so a 2.3 development version is unviable for us.

thanks

Myles

Avatar
Myles

9 January 2009 at 6:31am Community Member, 6 Posts

Any offers?

Please!

Avatar
UncleCheese

9 January 2009 at 9:32am 4085 Posts

I encourage you to check out my new module here:

http://www.silverstripe.org/all-other-modules/show/251905

Seems like it might suit your needs!

Avatar
Myles

9 January 2009 at 9:39pm Community Member, 6 Posts

cheers cheese,

might do - as an exercise, but this isn't looking great for SS in this evaluation if we can't get stable rc releases for a bulk image uploader and resizer, which in my opinion is a fundamental criteria for a simple-for-users cms.

M

Go to Top