Page 1 of 1

DB explanation - mshop_media

Posted: 09 Oct 2019, 10:27
by lucadambros
Hi,
I need to know more about the mshop_media table. The field "preview" is quite hard to understand for me.

How that work?

I have raw data and I want to insert it into that table (links for image products). How the json is created?
I mean, why sometimes you start with

Code: Select all

{"1": ...

and other times you start with

Code: Select all

{"240": ...
?

Thank you very much

Re: DB explanation - mshop_media

Posted: 09 Oct 2019, 11:43
by aimeos
The JSON in the "preview" column represents the different preview image sizes with the width of the image in px as key (e.g. "240"). If an image doesn't has a size (e.g. SVG) or isn't an image, than "1" px width is used as key.

Re: DB explanation - mshop_media

Posted: 09 Oct 2019, 11:52
by lucadambros
Thank you very much! :D