Reduce the size of photos thumbnail to 400px limit but keep GIF photo at the 800px limit