encoder only checks png and falls back to jpeg