Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.

Update cms.php #198

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update cms.php #198

wants to merge 1 commit into from

Commits on Jul 12, 2019

  1. Update cms.php

    FileService.php, when saving images, looks for a declaration in config/cms of `max-image-size`, with a default to 800px:
    
    ```php
    //cms/src/Services/FileService.php
    118    if ($isImage) {
    119                $storage = Storage::disk(Config::get('cms.storage-location', 'local'));
    120                $image = $storage->get($directory.$newFileName.'.'.$extension);
    121    
    122                $image = InterventionImage::make($image)->resize(config('cms.max-image-size', 800), null, function ($constraint) {
    123                    $constraint->aspectRatio();
    124                });
    125
    126                $imageResized = $image->stream();
    127    
    128                $storage->delete($directory.$newFileName.'.'.$extension);
    129                $storage->put($directory.$newFileName.'.'.$extension, $imageResized->__toString());
    130            }
    ```
    
    this config variable is not declared, and can be confusing if trying to upload hero_images larger than 800px. Propose adding the variable to the config/cms file by default
    mattkatt authored Jul 12, 2019
    Configuration menu
    Copy the full SHA
    6318c04 View commit details
    Browse the repository at this point in the history