format fetching images code