fix gallery image warning:unable to open file