DropzoneJS thumbnailWidth and thumbHeight not working

Problem

I use dropzone to handle multiple image downloads. I want it to generate thumbnails sized 280x280 pixels. Despite all my efforts, he continues to generate 100x100px thumbnails.

the code

Here is my code:

   Dropzone.options.addPhotosForm = {
     createImageThumbnails: true,
     thumbnailWidth: "280",
     thumbnailHeight: "280",
     ...
   } 

Here is my contact form:

      <form action="{{ route('store_photo_path', [$rooms->slug]) }}" 
          method="POST" class="dropzone" id="addPhotosForm">
        {{ csrf_field() }}
      </form>

Here is my CSS:

.dropzone .dz-preview .dz-image {
      width: 280px;
      height: 280px;
    }

I tried with and without quotes, with single and double quotes. So far, nothing has worked.

Do you guys know what the problem is?

Thank!

I read and tried these solutions: quotes / without quotes , xhrs , any of these , and jQuery .

Decision:

, . Photo.php. makeThumbail "- > fit (100)", 100x100. "- > fit (280)" .

:

public function makeThumbnail()
{
    Image::make($this->path)
        ->fit(280)
        ->save($this->thumbnail_path);
}
+4
2

:

, . Photo.php. makeThumbail "- > fit (100)", 100x100. "- > fit (280)" .

:

public function makeThumbnail()
{
    Image::make($this->path)
        ->fit(280)
        ->save($this->thumbnail_path);
}
0

, , .dz-image CSS.

+1

Source: https://habr.com/ru/post/1686688/


All Articles