Hi I found a short work around probably not elegant but it works.
It’s based on Data Loading and Processing Tutorial - Pytorch Tutorials 0.1.12_2 documentation 6.
I defined a custom transform function:
class Rescale(object):
"""
Rescale the image in a sample to a given size.

Args:
    output_size (tuple or tuple): Desired output size. If tuple, output is
        matched to output_size.
"""

def __init__(self, size=(224, 224)):
    assert isinstance(size, (int, tuple))
    self.output_size = size

def __call__(self, img):
    import PIL
    res = PIL.Image.Image.resize(img, self.output_size)

    return res

Then I called directly ImageFolder with Rescale:
train_data = dset.ImageFolder(root=path+'train', transform=T.Compose([Rescale(size=(256,256)), T.ToTensor()]), target_transform=None)
train_loader = DataLoader(train_data,batch_size=4)
for t, (x,y) in enumerate(train_loader):
    print(t, x.size())

Output(my dataset has 20 images so 5 batches of size 4):
0 torch.Size([4, 3, 256, 256])
1 torch.Size([4, 3, 256, 256])
2 torch.Size([4, 3, 256, 256])
3 torch.Size([4, 3, 256, 256])
4 torch.Size([4, 3, 256, 256])

Hopefully this going to be helpful for folks wanting such functionality.