How To Stop Duplicating Images In CSV Imports

September 1, 2023

Migrating events from one site to another or from one calendar to your EventON calendar should be hassle-free. In order to start importing events, you will need to have at least EventON 2.6 and the CSV Event Importer addon installed.

In this tutorial, we are going to be going through some steps that you can take to prevent duplicate images in your media gallery after a successful event import.

Formatting your CSV file

We recommend starting off the import process by copying and modifying the sample.csv file that comes with the addon after purchase. By default, the addon accepts the following CSV columns that should be used as headers on your CSV file:

  • publish_status – Publish status of the event: publish | draft
  • event_id (int) – Event post ID, if passed, event with this id will be updated with meta data
  • featured – Feature an event or no eg yes | no
  • color – Hex color for the event without # sign
  • event_name – Name of the event
  • event_description – Event main description
  • event_start_date & event_end_date – Start/End date in format mm/dd/YYYY
  • event_start_time & event_end_time – Start/End time in format h:mm:AM/PM
  • Location Fields:
    • location_name => Event location Name
    • event_location => Event location complete address
    • evcal_location_link => Location Link (http://)
    • evo_location_id => Location taxonomy term ID
  • Organizer Fields:
    • event_organizer => Organizer Name
    • evcal_org_contact => Organizer contact information eg. email
    • evcal_org_address => Organizer location address
    • evcal_org_exlink => Organizer external link (http://)
    • evo_organizer_id => Organizer taxonomy term ID
  • event_gmap – Generate google maps from address. eg yes | no
  • evcal_subtitle – Event Subtitle
  • all_day – All day event eg. yes | no
  • hide end time -Hide end time for event eg. yes | no
  • event_type categories – Event type category term IDs separated by commas eg. 4,19. You can add up to 5 event type categories in separate columns with column headers in format event_type, event_type_2, etc.
  • Custom Meta Fields:
    • cmd_{x} => Custom meta data values. You can add upto 10 custom meta field values with sepeate columns with column headers in format cmd_{x}
    • cmd_{x}L => can be used for custom field button url data
  • image_url – Complete http:// url to an image from external source
  • image_id – (integer) existing attachment ID from wordpress site you are importing events to
  • evcal_lmlink – Learn more link (http)
  • evcal_lmlink_target – Learn more link open in new window yes | no
  • User Interaction Fields:
    • _evcal_exlink_option => UX_val from 1-4 (integer)
    • evcal_exlink => UX_VAL link to event URL (http://)
    • _evcal_exlink_target => UX_val link open in new window yes | no
  • ActionUser Compatible Fields: 
    • evoau_assignu => User IDs seperated by comma to assign users to events

If the event images already exist in your media gallery, you should exclude the image_url column in your CSV file. This option downloads the image from the provided link and imports it to your media gallery hence causing multiple occurrences of the same images.

You should ONLY make use of the image_id column in your CSV file and populate this with the attachment ids of the images that exist on your media gallery.

How to get the attachment ID

  1. Head over to your media library by clicking on Media > Library.

2. Switch to the List view.

3. Hover / Mouse over the image that you would like to import and check the number that is displayed at the bottom left of the page.

You can use 30592 as the image_id in your import file and this will ensure that there are no duplicates after the import.

For additional import troubleshooting tips, please go through the following guide: How to Troubleshoot CSV Import Issues.

Did this article help you? If not, send us a ticket via helpdesk

Ready to setup your calendar?