[Seaside] Using image tags in Seaside

Andreas Nilsson wahboh at mac.com
Fri Sep 10 14:52:27 CEST 2004


In this case the images aren't really static as the user is supposed to 
be able to change them easily from the web interface.
But thanks for the tip, I'll keep it in mind if I come across a case 
where I wan't to serve static images.

/Adde

On 2004-09-09, at 16.52, Nevin Pratt wrote:

> Avi Bryant wrote:
>
>>
>> On Sep 8, 2004, at 5:56 PM, Andreas Nilsson wrote:
>>
>>> I'm trying to get seaside to show images on a page, but I don't 
>>> understand where to put the files.
>>> Found a FAQ on the web that said something about DocumentRoot in the 
>>> application config, but I can't find any setting named DocumentRoot.
>>
>>
>> Wow.  That FAQ is ancient - in fact, most of the content on that wiki 
>> is (note that I don't, AFAIK, link to it from anywhere anymore).
>>
>> Anyway, there are basically two options:
>>
>> - have the images hosted externally to Seaside, and use image tags 
>> with external URLs:
>>     html image: 'http://imagehost.com/myimage.jpg' altText: 'My Image'
>>
>> - suck the image data into your (Squeak) image, and serve it directly 
>> from Seaside:
>>     html imageWithForm: (MyImages at: #someImage)
>>
>> I prefer the second, from a deployment point of view, because you end 
>> up with just one .image file to copy around.  It's also great for 
>> dynamically generated images (use PlotMorph to generate live charts, 
>> for example).  But having something like apache serving static images 
>> can be a performance win.
>>
>> Avi
>>
>
> Andreas,
>
> Not-withstanding Avi's preference, which sounds just fine, we 
> never-the-less do the first.  My main reason for doing the first is 
> because images tend to be high bandwidth resource hogs, and I prefer 
> to keep such bandwidth hogs off of our main network, and moved over to 
> a different network that is optimized for raw static image serving 
> (served by Apache, and located elsewhere).  You can "buy" a site from 
> pretty much anywhere that will serve your images for you, and the cost 
> is reasonably cheap.  And you can upgrade such a site as necessary to 
> reflect your bandwidth needs.
>
> And, there certainly is no reason why you can't intermix both schemes, 
> depending upon your particular needs.
>
> Nevin
>
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside



More information about the Seaside mailing list