fixes photo upload for patterns, works on search