In January 2015, a gun assault on the Paris offices of the satirical magazine Charlie Hebdo and an attack on a kosher grocery store killed 17 people.
The ruling, made late on Thursday, came after the Paris prosecutor called for the magazine to be removed from sale.
News of the latest publication led to anger from victims' groups, who accused the magazine of trying to "offend the dignity of the victims and their relatives".
But in an emergency ruling responding to the Paris prosecutor's call for the magazine to be pulled from sale, the court said the pictures were "obscene for showing victims running away to try and escape death or about to die".More news: Supreme Court demands Vijay Mallya's presence to proceed in contempt case
Nice's Mayor Christian Estrosi also criticised the publication on the eve of the first anniversary of the attack.
The judge did ban the future publication of two particular images either in print or in digital forms.
A French journalist's union, SNJ, condemned the prosecutor's request, warning that it was a curb on press freedom. The magazine defended its decision to publish the images, saying it will defend "the right of the citizens, and first of all the right of the victims, to know what exactly happened during the attack".
He argued that screen shots of the lorry's deadly path had featured recently on TV, and that they were distant images of the scene in which victims could not be identified.More news: Hanged man was 'dark web mastermind'
Victims' organizations denounced the photos as the Riviera city of Nice prepares for the Bastille Day fete and commemoration of those killed July 14, 2016, when a 19-ton truck barreled into celebrating crowds.
Several non-fatal attacks, mainly on police officers throughout the country but mostly on the capital, have also been carried out.
CCTV images of the attack were a controversial subject immediately after the murders.More news: China intruded territory in Doklam, says Centre; Oppn promises support
- Marcel Kittel wins his fifth stage of the Tour de France
- Tulsa cop resigns after being acquitted in shooting of unarmed black man
- Boyd Holbrook's Exit from 'Narcos' Confirmed, Season 3 Teaser Trailer Released
- US House passes $695.9 billion national defense bill
- Sudan's Bashir 'suspends sanctions talks with US'
- The Johnson & Johnson (JNJ) is Chesley Taft & Associates LLC's 5th Largest Position
- Threat of severe thunderstorm has passed in Waterloo region
- DNA Double Feature: Scientists Replay Movie Stored in Molecules
- NASCAR at New Hampshire 2017 Qualifying Results: Kyle Larson Takes Pole
- Kaziranga turns into watery grave for animals