Use the actual allowed image extensions, insted of a hard-coded list.