added photo compression