Use getView() or the View parameter from implementing the onViewCreated method. It returns the root view for the fragment (the one returned byonCreateView() method). With this you can call findViewById().

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    ImageView imageView = (ImageView) getView().findViewById(R.id.foo);
    // or  (ImageView) view.findViewById(R.id.foo);

As getView() works only after onCreateView(), you can't use it insideonCreate() or onCreateView() methods of the fragment .