Each of the officers of the city shall receive such compensation as the mayor and council may by resolution or ordinance prescribe; provided, however, that the salaries of all city officers, when fixed and determined by the mayor and council in the manner prescribed in this Act, and in the manner prescribed by the laws and ordinances of the city, shall not be diminished during the terms of office for which such officers are elected.