Images embedded into a Daisy Page display full size in editing, but when they are saved, the display as a preview, with a link "Click to enlarge".
The default Daisy installation only displays full size images if the width is under a default value (at time of writing this was 650px). If the images is larger, it displays a preview with the "Click to enlarge" link.
This behavior is defined in the document-to-html.xsl, and can be overwritten in the skin
Basically, we are creating a new document-to-html.xsl inside the skin and changing the Maximium width value. Ths can be done two ways
<xsl:when test="$imageWidth > 801 and $linkInfo/p:linkPartInfo[@name='ImagePreview']">
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://outerx.org/daisy/1.0">
<xsl:import href="wikidata:/(webapp)xslt/document-to-html.xsl"/>
<xsl:template name="insertImage"> ... ... </xsl:template>
<xsl:when test="$imageWidth > 801 and $linkInfo/p:linkPartInfo[@name='ImagePreview']">
The preview behavior can also be modified in the <daisydata>/conf/myconfig.xml in the ImagePreSaveHook section ( the above method is the more appropriate).
In the section on <previewMaxSize>250</previewMaxSize>. When an image is loaded, if it is under this width (and under this height???) the real image will be used for the preview instead of generating a preview. Likewise for thumbnails modify the value <thumbnailMaxSize>125</thumbnailMaxSize>
Full reference on the "daisyskin" and "wikidata" schemes: http://cocoondev.org/daisydocs-2_0/374-daisy/25-daisy/192-daisy.html
| Name | Value |
|---|---|
| Category | Frontend (wiki) tutorials & extensions |