Currently i have system that's do resizing and creating as many images as needed and storing them on web servers file system. Also i make and entry in database of image basename in mysql. For example i upload 5 images the basename would be 372FDSC and then it will add _0, _1 etc. to each image in filesystem so it makes image look like 372FDSC_0.jpeg and so forth.
So where is my problem? It's that i cannot delete or upload new images since i don't know image name in code.
I wonder is there is some better solution to save image names for article? Like mysql row that holds all names (372FDSC_0.jpgeg;372FDSC_01.jpeg etc.) So when i delete or upload new ones i know what filename i can use.
I hope this all makes some sense to anyone if not please say and i'll add required details.