How does MATLAB recover picture from magnitude spectrum alone? This is the transformation I did. 
The code fft2() the Lena picture than ifft2() it back to the original. Add some abs() so it actually displays it.



According to this post an image cannot be reconstructed without the phase information, yet I see no indication of phase being used anywhere here.

I'm guessing MATLAB still uses it but keeps it out of sight for convinve. If so is it possible to view the phase component of a given picture as well as the magnitude spectrum?

CODE:

[x,map] = imread('PATH'); %import image
i = ind2gray(x,map);   % to greyscale

I = fft2(i); % 2D FFT

I = fftshift(I); % centre

ir = ifft2(I);

figure(1); imshow(abs(i),[]) % original
figure(2); imshow(log(double(abs(I))),[]) % original
figure(3); imshow(abs(ir),[]) % original


I guess I worded this really badly. How do I see the phase plot of the image's transform? I guess that sounds less stupid.
Your code uses the phase for the reconstruction. Have a look at the output of fft2(x); they are complex numbers, i.e. the contain phase and magnitude. Have a look at this code:

%%
[x,map] = imread('http://www.cs.cmu.edu/~chuck/lennapg/lena_std.tif'); %import image
%%
i = rgb2gray(x);   % to greyscale

I = fft2(i); % 2D FFT

I = fftshift(I); % centre
mag = abs(I);
phase = angle(I);
I_magonly = abs(I);
I_phaseonly = I ./ abs(I);

figure(1);
subplot(321); imshow(abs(i),[]); title('Original');
subplot(322); imshow(log(double(abs(I))),[]); title('spectrum magnitude');
subplot(323); imshow(phase,[]); title('spectrum phase');
subplot(324); imshow(abs(ifft2(I)),[]); title('reconstructed');
subplot(325); imshow(abs(ifft2(I_magonly)),[]); title('reconstructed magnitude only');
subplot(326); imshow(abs(ifft2(I_phaseonly)),[]); title('reconstructed phase only');




It loads the Lena image, creates the FFT, and displays phase and magnitude information. Then it tries to reconstruct only based on phase or magnitude. Apparently, phase contains more information (for our eyes) than the magnitude. But you need to both exactly reproduce the image from its Fourier transform.