Script for preload images to upload before submit form