2008/6/5 Wichert Akkerman <[EMAIL PROTECTED]>: > Previously Laurence Rowe wrote: >> Martin Aspeli wrote: >> >Hi, >> > >> >I'd like to use Reflecto to expose an asset repository of images, flash >> >graphics and so on. This will be managed outside Plone (obviously), but I >> >want to be able to incorporate content into Plone pages using kupu. >> > >> >I added Reflector and ReflectoFolder as kupu collections and ReflectoFile >> >as >> >a media object. This actually seems to work OK - I can browse and include >> >the images. However: >> > >> > - I don't get a preview image in kupu >> > >> > - There's no resize option (this would be hard anyway, I'm guessing) >> > >> >I think that if Reflecto exposed a unique type for images (e.g. it looked >> >at >> >file extensions) it could have an image preview in the template, and we >> >could set this up as a mediaobject type in kupu with a preview URL, and >> >maybe even do some on-the-fly resizing (possibly less important). >> > >> >How hard would this be to do? Looking at the Reflecto source, I see >> >__getitem__() in content/directory.py; seems to me that if we created a >> >different proxy class and allowed for some pattern matching where it >> >currently just checks for directory vs. file, then this could work? >> > >> >Martin >> >> This sounds sensible. I'd have thought that preview comes for free once >> you implement on-the-fly resizing, presumably by just stealing the logic >> from ATImage. > > ATImage actually stores copies of the image at all defined scales. > Reflecto can not do that, and on-the-fly scaling can be very expensive.
I thought there was a cache somewhere for storing these things, but looking again it's not existed for a long time, or I'm misremembering. Would this be easily cacheable in Varnish? I guess not if not viewable by anonymous. I guess to do this efficiently would require a custom filesystem cache. Unfortunately I can't see one anywhere for zope.app.cache. Laurence _______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
