add img optimize & modify isHiddenFile method