Bulk multi image per item upload

I have been experimenting with bulk uploads to gain a better understanding of how the system behaves. Due to the nature of how our volunteers work, bulk uploads are likely to be a key part of our workflows.

We have many items in our collection where we have multiple images. From my understanding I have identified the following:

  • Providing file:http… links in special_document column will ADD images to the item (and not replace)
    • This means one should avoid re-using export CSVs verbatim as your items will all get a duplicate image.
  • In similar fashion to WordPress product uploads, you can provide a file anywhere on the internet and the system will import it.
  • I use the Imsanity plug-in to ensure images are not too big.
    • I had to turn it on for “Images uploaded elsewhere” for it to work with the Tainacan import.
  • I could not find a way to upload multiple images in one CSV (I tried separating URLs as I have with WordPress product uploads, but this did not work).
    • This is not a big issue as it is easy to just run several imports for each image.
  • The last image you upload becomes the primary image and thumbnail for the item. Therefore one should upload the primary image last.

Does my understanding align with other people’s experience? Are there any other tips or alternative ways to bulk upload images that I am missing?

Of course, once posted, I see a related topic :grimacing: Incluir imagens em massa em coleção - I translated the conversation and alas looks like I can use the special_attachments for the non-primary images. Key tip pasted below in English in case anybody else finds this post via English keywords;

"special_item_id of each object, so that Tainacan understands that it is an update special_document with file: followed by the URL, which defines the main image special_attachments for the attachments; if there is more than one image, separate by || "

Kudos to @andre_benedito

1 curtida

Key difference between special_document and special_attachments is that special_attachments must not have “file:” at the beginning of the URLs.

1 curtida

Yes, the special_attachments is the solution for most of what you were pointing too. They only need the URL because they are only for attachments. the special_document, on the other hand may be a file (to be imported and attached), an url (to be linked or embeded as an external resource), or a pure text, which is why it needs the prefix.

The special_item_id is what will allow you to perform bulk updates via CSV importer. If you import a CSV file containing this column and any other columns, only those present will affect the item, which means you can choose which metadata to affect.

There is one extra tip.The special_attachments column is “append by default”, which means if the column is present and you add URLs there, the listed files will be imported, even if they already exist. If you would like to actually replace the files there by others you can define the column header as special_attachments|REPLACE. This particular detail should be in our Wiki but it lost sync in the English page. The Portuguese one mentions it. @Maria_Cecilia yet another thing to take a look there.

1 curtida

@mateus.m.luna I had assumed that thumbnails would be auto created at appropriate size, however it appears when I use Mosiac, it is using the full size images - is my understanding correct?

When I had experimented with the POC, I had used a script to create thumbnails so that I could have the beauty of Mosiac while still having acceptable performance. Is this the best way?

Writing without checking, but I think I remember that I can upload thumbnails via CSV too.

Mosaic view mode tries to use the ‘tainacan-large-full’ size, which is around 480px of width (height should auto adjust unless its higher than 860px, but never crop, only resize). If the image was sent to the item via Media modal or auto-generated from the Document via importer, then you should have in your folder that cropped version. If the Mosaic view mode renders the full image size it means it is not finding that resized copy.

One possible reason is missing or misconfigured ImageMagick modules… in that case you would see a warning in the System Diagnosis page. You can share it with us if you need help understanding it. But an easier test would be sending a new image now via traditional upload and checking if the cropped and resized versions exist.

I don’t understand well why did you have to use a script here. What did the script did? Maybe its due to this flow that the cropped versions were not generated.

Yes you can. If you add a ‘special_item_thumbnail’ column it will reference that image url to import a thumbnail. But this is useful when your document is not an image (say a video, audio, PDF…). In case the document itself is the image, use only the ‘special_document’, the import flow will detect if no thumbnail is present and generate it from there.

1 curtida

Thanks @mateus.m.luna - your tip helped me realise it was indeed a missing php module. The POC used a different host to my MVP site so it did not have this issue. I had originally created my own thumbnails for PDFs with a script as I did not realise Tainacan would do it for me :woozy_face: . I will now remove and re-upload images to check performance.

1 curtida