optimize photo storage