public function getUploadFieldOptions($field = null)
    {
        // get first option if no field provided
        if (is_null($field)) {
            $imagesFields = $this->getDefinedUploadFields();

            if (!$imagesFields) {
                throw new InvalidUploadFieldException(
                    'No upload fields are defined in $imageFields/$fileFields array on model.'
                );
            }

            $fieldKey = array_first(array_keys($imagesFields));
            $options = is_int($fieldKey) ? [] : array_first($imagesFields);

            return $options;
        }

        // check if provided filed defined
        if (!$this->hasImageField($field)) {
            throw new InvalidUploadFieldException(
                'Image/File field `' . $field . '` is not defined in $imageFields/$fileFields array on model.'
            );
        }

        return array_get($this->getDefinedUploadFields(), $field, []);
    }