some performance tweaks. js order an compressed images with average savings of 50% in filesize