Both YouTube and popular micro-blogging site Twitter were inaccessible from Turkey for hours on Monday, with the ban on Twitter lifted late in the evening.
As of 0600 GMT, YouTube was also accessible.
The prosecutor seen in the pictures, Mehmet Selim Kiraz, was later killed in a shoot-out between his hostage takers and police last week.
A spokesman for President Tayyip Erdogan said on Monday that a prosecutor had demanded the bans because some media organisations had acted "as if they were spreading terrorist propaganda" in sharing the images of the hostage-taking.
Facebook said it had restricted access to some content as instructed and a company spokesman said it would appeal the order.
© Thomson Reuters 2015
Get your daily dose of tech news, reviews, and insights, in under 80 characters on Gadgets 360 Turbo. Connect with fellow tech lovers on our Forum. Follow us on X, Facebook, WhatsApp, Threads and Google News for instant updates. Catch all the action on our YouTube channel.
Apple Watch Series 12
Starts from ₹56,900
Samsung Galaxy Watch Ultra 2
Starts from ₹62,479
Samsung Galaxy Watch 9 (44mm, LTE)
Starts from ₹41,999
Samsung Galaxy Watch 9 (40mm, LTE)
Starts from ₹38,999
Samsung Galaxy Watch 9 (40mm)
Starts from ₹36,999
Samsung Galaxy Watch 9 (44mm)
Starts from ₹40,999
Samsung Galaxy SmartTag 3 India Launch Timeline Confirmed by Company Executive
Microsoft Announces $50 Xbox Nano Controller, Launch Set for Next Month