docs: public static CmsImageScaler getDownScaler(CmsObject cms, String rootPath) {
  
          if (m_downScaler == null) {
              // downscaling is not configured at all
              return null;
          }
          // try to read the image.size property from the parent folder
          String parentFolder = CmsResource.getParentFolder(rootPath);
          parentFolder = cms.getRequestContext().removeSiteRoot(parentFolder);
          try {
              CmsProperty fileSizeProperty = cms.readPropertyObject(
                  parentFolder,
                  CmsPropertyDefinition.PROPERTY_IMAGE_SIZE,
                  true);
              if (!fileSizeProperty.isNullProperty()) {
                  // image.size property has been set
                  String value = fileSizeProperty.getValue().trim();
                  if (CmsStringUtil.isNotEmpty(value)) {
                      if (PROPERTY_VALUE_UNLIMITED.equals(value)) {
                          // in this case no downscaling must be done
                          return null;
                      } else {
                          CmsImageScaler scaler = new CmsImageScaler(value);
                          if (scaler.isValid()) {
                              // special folder based scaler settings have been set
                              return scaler;
                          }
                      }
                  }
              }
          } catch (CmsException e) {
              // ignore, continue with given downScaler
          }
          return (CmsImageScaler)m_downScaler.clone();
      }