How do I convert a filter from Spatial to Fourier domain? I have a small 2D Gaussian image filter that I am currently applying as a window by convolution. I would like to do this in the Fourier domain as a single multiplication. I would like to convert my current small filter to the Fourier domain as it is with maximum possible fidelity.

I do not know the size of the image that I shall be applying it on and want to be able to dynamically change it for any image size. How do I go about doing this?

Can I scale my filter to the image size (square to rectangle), FFT the scaled and now distorted and multiply in the Fourier domain?

or 

Should I FFT it first, scale up (square to rectangle) and distort the FFT and then multiply it?

I am not convinced that either is a correct approach. Are there any alternative ways?

I am working with this in MATLAB
For a low-pass filter that is small compared to the image you can put your filter (unscaled) in the center of a square/rectangle the size and shape of your image (all the other pixels are 0), take the FFT and multiply the result  in the Fourier domain.

Since you are using a Gaussian filter you could do something more efficient than that.  The Gaussian filter is _ separable_ so you can actually create a 2D Gaussian filter by doing a 1D Gaussian filter in every row (column) in one dimension followed by a 1D Gaussian filter in every column (row) in the other dimension.

Second, the Fourier transform of a Gaussian is a Gaussian.  So we can work in one dimension at a time, we know what we're going to get, and multiplying a Gaussian in the Fourier domain is also separable since $e^{-(x^2+y^2)}=e^{-x^2}e^{-y^2}$.  The only question is what the standard deviation ($\sigma$) of the transformed Gaussian is going to be.  The derivation is worked out on Mathworld as:
$$
\mathcal{F}[e^{-ax^2}](k)=\sqrt{\frac{\pi}{a}}e^{-\pi^2k^2/a}.
$$