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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

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

Best Way to Import Images via CSV?


Go to End


2 Posts   1463 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.