We have imported the old Joomla content into K2. In the original content the article image was simply placed inline using the html editor, but although the images do show up, they don't look at all like those handled by K2 using the tab image > browse server
. K2 images looks much better.
Since we have about 1000 articles I would like to make a script that can convert the images to the "K2 way". My main problem here is that I can't figure out how K2 stores this image information. I have tried comparing two mysql dumps, before and after adding an image, but I have not been able to determine which tables are involved.
So my question is: How and where is K2 article image informartion handled?
Of course, if there already exists a solution that can do this kind of conversion, I would like to know that as well.
Even after logging and analyzing all SQL queries I still can't find where in the DB K2 image info is stored. And there is a reason why: It doesn't use the DB at all.
Images are stored in
/media/k2/items/cache/
/media/k2/items/src/
using the md5 sum of the K2 item ID as the base of the filename. It then looks on the fly for images in these folders to display when you browse the articles.
There is a bit more info here:
Where does k2 componet store its images in the database?
I have now made a script that will convert embedded images to K2 external images.