To answer your question faster, you can search our knowledgebase articles before submitting a ticket.

Developers -- How to save URLs of property images instead uploading them to host?

Posted by Howard R. on 05 June 2016 03:27 AM

First of all, we recommend you to upload images of listings to host and let WPL to resize them based on its options because it will have great affect on your website page speed and reducing page size.

But if you don't want to save images on the host for any reason, you're able to save only image URLs into the WPL items table ([wp_prefix]_wpl_items). This feature called "External images" in WPL and users are able to insert the image links (each link on a new line) on WPL->Add/Edit Listing->Image Gallery->External Images. Then WPL saves the links into [wp_prefix]_wpl_items table.

You can follow the same structure on your massive import code. Just make sure you use exactly the same code. You can see WPL code as a sample here: /path/to/wpl/views/backend/listing/wpl_gallery.php -> wpl_listing_controller::save_external_images function. You should use wpl_items::save($item); function for saving external images.

Comments (0)