Add analytics and compress image