I recommend my (free) Blob Server module if you've put the images into your DB as blobs (not base64).