fixed photo size function