<%image(pic.jpg|640|480|text to be displayed)%>where 4 variables, from left to right, are image's file name, width, height, description, respectively. Note that no image path is stored here.
When this custom image expression is fetched from database, first split it into 4 variables, then rebuild a IMG tag with a pre-defined image base URL, e.g., http://www.example.com/image/
<img src="http://www.example.com/image/pic.jpg width="640" height="480" title="text to be displayed" alt="text to be displayed" />
No comments:
Post a Comment