Store product images in filepacks
A filepack groups files under a single .fp path in the Lokad file explorer.
This guide imports product images into /catalog/images.fp and uses their
entry paths in a dashboard. You need a configured transfer project, images
on its remote connection, and permission to write the destination pack and
entry paths.
Import the images
In the project’s transfer instructions,
use GET with a destination below the .fp path:
Source,Destination,Action,Flags
/remote/images/item.png,/catalog/images.fp/item.png,GET,
Source is on the configured remote server; Destination is in Lokad.
To import a folder instead, use:
Source,Destination,Action,Flags
/remote/images/,/catalog/images.fp/,GET,
Run the transfer project. The file explorer contains /catalog/images.fp;
item.png is an entry inside it, not a separate file beside the pack.
Subfolders are retained in entry paths, such as
/catalog/images.fp/shirts/blue.png.
Display and preview an image
Once the entry exists, pass its full path to
downloadUrl to display it in an image
tile. Use previewUrl for a link that
opens its preview:
path = "/catalog/images.fp/item.png"
show image "Product image" { 1..3, 1..4 } with downloadUrl(path)
show table "Image preview" { 1..3, 6..7 } with
"Preview" { href: #(previewUrl(path)) }
The path-based preview link resolves the current entry when opened, so it follows later image updates. Access to an entry still depends on the user’s file permissions. Permission to view selected entries does not necessarily grant permission to download the entire pack.
Update entries without replacing the pack
Writing to /catalog/images.fp/item.png replaces that entry and preserves
the others. Writing directly to /catalog/images.fp replaces the whole file;
it does not insert an image into the pack. The entry-path convention also
applies to file uploads and other applications writing files in Lokad.
With a transfer project, successful downloads are committed even if other downloads fail; failed entries retain their previous content. Cancellation publishes no update. Check the transfer result before treating the pack as fully refreshed.
Do not use the Newer transfer flag for packed destinations: entries do not
have individual modification dates. A filepack is not a local source folder
for PUT, and transfer DELETE targets the remote server, not pack entries.
This workflow provides image access through URLs. It does not make packed
entries available as general-purpose Envision read inputs.