In TensorFlow.js, images of different sizes can be handled by resizing them to a uniform size or by using fully convolutional networks that reduce the image size step-by-step during processing.