The pictures show the arrest in March of Basque activist Noroa Ariznabarreta who had refused to appear in court over a 2007 demonstration.
Argia magazine journalist Axier Lopez posted pictures of the activist's arrest on Twitter.
"The defendant published images of the police raid in Eibar in his Twitter account @axierL without any permission.
"The police officers that took part in the operation can be identified by those images, with the risk this poses to them," according to the government complaint the magazine posted on its website.
More From This Section
Controversially it also prohibits the "unauthorised use" of images or data of security forces that could "endanger" them.
Rights groups including Amnesty International and associations of lawyers and journalists have protested over the "gag law".
A Spanish woman was fined 800 euros in August for posting on the Internet a photograph of a police vehicle parked in a space reserved for the disabled. Due to the controversy it generated, the authorities finally gave up imposing the fine.