[Seaside] Using image tags in Seaside

Avi Bryant avi at beta4.com
Thu Sep 9 10:42:45 CEST 2004


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



More information about the Seaside mailing list