Does the erase all content and setting button in my iPhone settings delete my pictures and contacts?

I want to reset my iPhone, but I want token my photos. I don't really care about contacts to be honest, but if it didn't erase them that would be a plus. There's a button in my settings that says "erase all content and settings" but I don't know it it will erase my pictures. Will it?

I thought that "Erase all Content and Settings" couldn't get any more clearer than that. Your pictures are contents, so they will be deleted. Back them up before proceeding.