At the last minute, the Carter administration has changed its policy on oil.

Yesterday, Cabinet secretaries were told that they could arrange to have their official portraits done in oil paint at government expense. In 1977, President Carter had directed Cabinet officials to have their political portraits made by photograph -- instead of the traditional oil -- as a cost-cutting measure.

But according to Secretary to the Cabinet Eugene Eidenberg -- whose office called all the Cabinet secretaries yesterday to announce the new policy -- President Carter changed his mind "in the last couple of days. A number of people talked to him and said it would be a good thing to do."

Carter's revised policy permits each secretary to charge the cost of the oil portraits to his department's budget -- if they act by noon today. If they miss the deadline, Eidenberg said, "they couldn't take any steps at all."

It was not clear yesterday how many secretaries would opt for oil. National Portrait Gallery Director Marvin Sadik estimated the cost of such portraits at $5,000 to $15,000 in today's market.

Several Cabinet secretaries have already had oil portraits made at private expense, a practice permitted under the 1977 policy. For example, last Sunday at a State Department dinner, Secretary of State Edmund Muskie was presented with a gift of money to pay for an oil portrait. The funds were donated by various State Department staff members, according to Leon Billings, Muskie's executive assistant.

"If they still have the funds," said Eidenberg, "they can be returned to the people. Or they can buy the secretary a nice frame."

If the money is refunded, Billings said, "the contributions would go to the State Department Fine Arts Committee to acquire more historical artifacts."

An exhibition of the official photo portraits caused a small stir in September of last year when it opened to the public at the National Portrait Gallery. The images drew a variety of critical comments from some viewers. "My guess is that the secretaries would have preferred paintings," director Sadik said yesterday.

Early this year, art advocate Joan Mondale defended the phot-portraiture venture: "They are the only ones we're going to have in the whole history of the U.S. government, I'll bet you a dollar."

Traditionally, the portraits of Cabinet hand in the corridors of their respective departments. The outgoing secretaries need not worry about the portraits' being completed during their successors' terms. "Secretary Califano [former secretary of the Department of Health, Education and Welfare] presided over the hanging of Secretary Forrest Mathews' portrait," Eidenberg said.