Only decode and update image if app is in foreground