{"id":917,"date":"2025-03-24T14:28:01","date_gmt":"2025-03-24T14:28:01","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/how-to-format-the-csv-file-for-importing-listing-images\/"},"modified":"2025-04-03T15:24:22","modified_gmt":"2025-04-03T14:24:22","slug":"how-to-format-the-csv-file-for-importing-listing-images","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/how-tos\/how-to-format-the-csv-file-for-importing-listing-images\/","title":{"rendered":"How to format the CSV file for importing listing images"},"content":{"rendered":"\n<div class=\"wp-block-blockstrap-blockstrap-widget-alert d-flex align-items-center fade show alert alert-info mb-3\" role=\"alert\"><span class=\"fas fa-info-circle me-2\"><\/span><span class=\"flex-grow-1\">When <strong>importing listings<\/strong>, you can add image details for the listings in the\u00a0<strong><em>post_images<\/em><\/strong>\u00a0column.<\/span><\/div>\n\n\n\n<p>In order to allow for commas in the caption, a double colon is added between images:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">::<\/pre>\n\n\n\n<p>For each image reference you need a <strong>file reference<\/strong>, <strong>media ID<\/strong>, <strong>title<\/strong> and <strong>caption<\/strong>.<br>For example, the data required to import 2 images would be in this format:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">file reference|media ID|title|caption::file reference|media ID|title|caption<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>File reference<\/strong><\/h3>\n\n\n\n<p>(Note: if you are importing an exported CSV the images will have a media ID and will not be processed)<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Manual bulk upload:<\/strong> Use the filename like this:\u00a0<br><i style=\"font-weight: bold;\">filename.extension <\/i>(for example <strong>hotel.jpg<\/strong>) then you can bulk upload the images to the current month upload directory as shown in the examples below.<\/li>\n\n\n\n<li><strong>Download and Import image: <\/strong>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.)<br><strong><a href=\"https:\/\/mysite.com\/wp-content\/uploads\/year\/month\/my-image.jpg\">https:\/\/mysite.com\/wp-content\/uploads\/year\/month\/my-image.jpg<\/a><\/strong>\u00a0<br><strong>Note:<\/strong> This URL is only shown as an example.<\/li>\n\n\n\n<li><strong>Externally hosted images: <\/strong>If you wish to use an external image, you can reference the external image and add a <strong>&#8220;#&#8221; <\/strong>before it, this will let the system know to not download it. (external images won&#8217;t be used as a featured image)<br><strong>#<em><a href=\"https:\/\/mysite.com\/wp-content\/uploads\/year\/month\/\">https:\/\/mysite.com\/wp-content\/uploads\/year\/month\/<\/a><\/em>my-image.jpg<b style=\"background-color: initial;\">\u00a0<\/b><\/strong><b style=\"background-color: initial;\"><br><\/b><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Media ID<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Leave this empty when importing new listings.<\/li>\n\n\n\n<li>When updating listings, include the image ID as exported.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Title&nbsp;and Caption<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Can be shown as part of image displays.\u00a0<\/li>\n\n\n\n<li>These can be left blank.<\/li>\n\n\n\n<li>For <strong>example<\/strong> with a title &#8220;City map&#8221; and caption &#8220;An image of a city map&#8221;:<br><figure><img loading=\"lazy\" decoding=\"async\" sizes=\"auto, (max-width: 314px) 100vw, 314px\" srcset=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-GoAyKtyqG9.png 314w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-GoAyKtyqG9-300x129.png 300w\" width=\"314\" height=\"135\" class=\"attachment-large size-large\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-GoAyKtyqG9.png\" alt=\"\"><\/figure><\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Examples<\/h2>\n\n\n\n<p>Import 3 images only:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">1.jpg|||::2.jpg|||::3.jpg|||<\/pre>\n\n\n\n<p>Import 2 images with title and caption:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">hotel.jpg||Hotel|This is a nice hotel::restaurant.jpg||Restaurant|This is a nice restaurant<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-blockstrap-blockstrap-widget-alert d-flex align-items-center fade show alert alert-info mb-3\" role=\"alert\"><span class=\"fas fa-info-circle me-2\"><\/span><span class=\"flex-grow-1\">When adding new images, <strong>upload the images<\/strong> to the uploads folder for the current month, for <strong>example:<\/strong><\/span><\/div>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" srcset=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-Z3WhntJUEV.png 359w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-Z3WhntJUEV-300x203.png 300w\" width=\"359\" height=\"243\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-Z3WhntJUEV.png\" alt=\"\"><\/p>\n\n\n\n<p><strong>Filename and File type<\/strong><\/p>\n\n\n\n<p>GeoDirectory&#8217;s importer can only import images from a remote URL that has both filename and filetype.<\/p>\n\n\n\n<p>URLs like this will work.<br>https:\/\/mysite.com\/images\/filename<strong>.jpeg<\/strong><br>URLs like this will not work<br>https:\/\/mysite.com\/images\/1234121231-LHLKHKHP<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[211,432],"class_list":["post-917","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-tips-tricks-more","gd_placecategory-how-tos"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/types\/gd_place"}],"author":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/comments?post=917"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/917\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=917"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=917"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}