OpenNumismat / open-numismat

OpenNumismat, is intended primarily for registering a collection of coins. But it is also suitable for other types of collectibles - stamps, postcards, badges and more exotic things.
http://opennumismat.github.io/
GNU General Public License v3.0
95 stars 28 forks source link

[Improvement] Save images as reference / avoid duplicate images in the DB #232

Open business-tomcat opened 2 months ago

business-tomcat commented 2 months ago

Hello!

I mainly collect Euro coins and use Colnect as coin catalog. This works perfectly!

I also like the fact that images are included, which is particularly useful for collector coins.

Unfortunately, the database is getting very large. According to my observations, this is partly due to the fact that the images are stored as PNGs (probably because Colnect delivers PNGs). At the moment I don't see any way of converting them easily.

On the other hand, images are saved again and again. Example: I collect the same coins from different mints. This means that they have the same Colnect ID / km number (i.e. they are the same coin in the catalog), but have different mint marks / mints.

It would be great if the same images were only saved once and the coins would point to the same image after using the duplicate function.

The problem is made worse because I synchronize the database across several computers and with small changes the upload is still very large (complete DB). Internet in Germany is unfortunately still such a thing ;)

Alternatively, how about to save the images in the file system instead of the database and synchronize them separately from the database. In that case, the reference is still possible and it would also be easier to batch convert the images.

Thanks, business-tomcat!

pmraps commented 2 months ago

Maybe the use of WebP format could help?

NEKolev commented 2 months ago

Hello!

I mainly collect Euro coins and use Colnect as coin catalog. This works perfectly!

I also like the fact that images are included, which is particularly useful for collector coins.

Unfortunately, the database is getting very large. According to my observations, this is partly due to the fact that the images are stored as PNGs (probably because Colnect delivers PNGs). At the moment I don't see any way of converting them easily.

On the other hand, images are saved again and again. Example: I collect the same coins from different mints. This means that they have the same Colnect ID / km number (i.e. they are the same coin in the catalog), but have different mint marks / mints.

It would be great if the same images were only saved once and the coins would point to the same image after using the duplicate function.

The problem is made worse because I synchronize the database across several computers and with small changes the upload is still very large (complete DB). Internet in Germany is unfortunately still such a thing ;)

Alternatively, how about to save the images in the file system instead of the database and synchronize them separately from the database. In that case, the reference is still possible and it would also be easier to batch convert the images.

Thanks, business-tomcat!

There are quite a few articles on the internet about this. From what I've read keeping the files on disk rather than in the database is better BUT most were professional software with administration and such or a person who knew what they were going to do and how the program was maintained. Here, the convenience of having everything in one file is huge, and I would expect a few seconds slower performance, although I have not noticed any kind of slowdown in performance. I'm pretty sure they are stored as JPEG format in the database. An image being of some coins might be useful, but it would cause a lot of problems with rubbing records and such in my opinion. The author has a planned cloud storage ToDo list.

Maybe the use of WebP format could help?

The author's ToDo list is to store the images in Webp and/or Avif format.