StandardScaler is not applied to arrays (images), I only extract them and divide by 255 and that’s it. As for the numerical part, you can see that StandardScaler  is applied to X_num_train_normm and X_num_test_normm.  The former two are training and test sets of the whole dataset for numerical part.
To understand what I want to do, please refer to this link.
Have I explained it properly? Drop any questions if something is not clear.