@Chaitu28 , yes it is possible.
As @8bitmp3 mentioned that you have to use 224 * 224 images to directly feed the model in tfhub.
But you can use existing model for other sized images as well.
How? Let me tell you couple of ways which I can think of:
(1) Very simple solution is to resize your images (specifically I would suggest you to add padding to make square shaped and then reduce the size or center crop) to 224 * 224 and now you can feed to tfhub Resnet-50 model.
(2) More robust approach in this case would be to go for pretraining or transfer learning of a layer. Since you can see that hub.KerasLayer defines the complete Resnet-50 as a layer and this layer is part of sequential model. So, you can define custom input size with one more Conv layer which outputs 224 * 224 * 3 image and that will solve your problem. But note here that with this new model, you need to train the model over your data which will only train the first Conv layer that we added because hub.KerasLayer by default non-trainable (trainable param is set to False). See below snippet.
   m = tf.keras.Sequential([
       tf.keras.Input(shape=(custom_height, custom_width, 3)),
       tf.keras.layers.Conv2D(....),  # Define conv such that it outputs 224 * 224 * 3 images
       hub.KerasLayer("https://tfhub.dev/tensorflow/resnet_50/classification/1")])

Also attaching link to doc 5 which can help you