You can use the following import.js to download all page images:
export default {
transform: ({ document, url }) => {
const result = [];
const images = document.querySelectorAll('img');
images.forEach((img) => {
const u = new URL(img.src, url);
const newPath = WebImporter.FileUtils.sanitizePath(u.pathname);
const imgData = {
path: newPath,
from: img.src,
};
result.push(imgData);
});
return result;
},
};
You can also follow instructions from https://github.com/adobe/helix-importer-ui/blob/main/docs/download-pdf.md to download the pdf. In both cases, no preview is available for those assets. For images, it would be great to preview the images in the Preview panel (and hide other tabs) and for PDF have a download link or something...
This is a nice to have, using the Save file locally option gives the asset.
You can use the following
import.jsto download all page images:You can also follow instructions from https://github.com/adobe/helix-importer-ui/blob/main/docs/download-pdf.md to download the pdf. In both cases, no preview is available for those assets. For images, it would be great to preview the images in the Preview panel (and hide other tabs) and for PDF have a download link or something...
This is a nice to have, using the Save file locally option gives the asset.