The Lightroom Export has the possibility to write the size of a picture in the file name. If I downscale it automatically with Lightroom e.g. "long side should be 2000px", LR still writes the original full size in the file name.
What do I have to change, to get the new size in the file name?
The Filename Template Editor pulls from the file metadata that is viewable in the metadata panel in the Library module. "Cropped" will display the cropped pixel dimension if a crop is applied. "Dimensions" will always display the original dimension of the file selected for output. Unfortunately, there is no current mechanism in place for Lightroom to detect/predict the output dimension of a file that is resized via the image sizing pane of the Export Dialog.
If you require the output dimension to be included in the filename, a workaround would be to set up a renaming preset that is tied to an Export preset that has an output dimension predefined in the Image Sizing pane of the Export Dialog.