photo functionality for posts and profile