Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Best Way to Import Images via CSV?


Go to End


2 Posts   1040 Views

Avatar
cSGermany

Community Member, 37 Posts

23 September 2013 at 10:54pm

Hi there,

I want to import several images, each belongs to one article.
I thought about doing this with

private static $has_one = array (
		'Visual' => 'Image'
	);
	
    private static $summary_fields = array(
        'Visual.Url'
    );

and than put the path to each image in the csv file.

is there a better way?

Thx in advance
cSGermany

Avatar
zenmonkey

Community Member, 545 Posts

14 October 2013 at 7:19pm

You need create a custom CSV import to create the image object and relation for the image, I'd done somethign like that in ss2.4.