How to format the CSV file for importing listing images
When importing listings, you can add image details for the listings in the post_images column.
In order to allow for commas in the caption, a double colon is added between images:
::
For each image reference you need a file reference, media ID, title and caption.
For example, the data required to import 2 images would be in this format:
file reference|media ID|title|caption::file reference|media ID|title|caption
File reference
(Note: if you are importing an exported CSV the images will have a media ID and will not be processed)
- Manual bulk upload: Use the filename like this:
filename.extension (for example hotel.jpg) then you can bulk upload the images to the current month upload directory as shown in the examples below. - Download and Import image: If you are adding a new image that does not have a media ID you can reference the image as a URL and it will be downloaded and imported into your system. (URLs must contain a valid image extension.)
https://mysite.com/wp-content/uploads/year/month/my-image.jpg
Note: This URL is only shown as an example. - Externally hosted images: If you wish to use an external image, you can reference the external image and add a "#" before it, this will let the system know to not download it. (external images won't be used as a featured image)
#https://mysite.com/wp-content/uploads/year/month/my-image.jpg
Media ID
- Leave this empty when importing new listings.
- When updating listings, include the image ID as exported.
Title and Caption
- Can be shown as part of image displays.
- These can be left blank.
- For example with a title "City map" and caption "An image of a city map":
Examples
Import 3 images only:
1.jpg|||::2.jpg|||::3.jpg|||
Import 2 images with title and caption:
hotel.jpg||Hotel|This is a nice hotel::restaurant.jpg||Restaurant|This is a nice restaurant
When adding new images, upload the images to the uploads folder for the current month, for example:
Filename and File type
GeoDirectory's importer can only import images from a remote URL that has both filename and filetype.
URLs like this will work.
https://mysite.com/images/filename.jpeg
URLs like this will not work
https://mysite.com/images/1234121231-LHLKHKHP