atstockland said almost 3 years ago on StimulusJS, Active Storage and DropzoneJS :
Hi David and friends - 

resizeHeight and resizeQuality don't seem to be affecting the uploaded image in any way.  I'm wondering if maybe it has something to do with direct_upload...maybe those options are never triggered.  Did you play with these settings when using DropzoneJS?

My Dropzone_controller looks like this:
import { Controller } from "stimulus"
import Dropzone from "dropzone"
import 'dropzone/dist/min/dropzone.min.css'
import 'dropzone/dist/min/basic.min.css'
import { DirectUpload } from "@rails/activestorage"

export default class extends Controller {
  static targets = ["input"]

  connect() {
    Dropzone.autoDiscover = false

    this.inputTarget.disable = true
    this.inputTarget.style.display = "none"
    const dropzone = new Dropzone(this.element, {
      url: '/',
      maxFiles: 10,
      maxFilesize: 6,
      addRemoveLinks: true,
      resizeHeight: 50,
      resizeQuality: 0.1,
      autoQueue: false
    })

    dropzone.on("addedfile", file => {
      setTimeout(() => {
        if (file.accepted) {
          const upload = new DirectUpload(file, this.url)
          upload.create((error, blob) => {
            this.hiddenInput = document.createElement("input")
            this.hiddenInput.type = "hidden"
            this.hiddenInput.name = this.inputTarget.name
            this.hiddenInput.value = blob.signed_id
            this.inputTarget.parentNode.insertBefore(this.hiddenInput, this.inputTarget.nextSibling)
            dropzone.emit("success", file)
            dropzone.emit("complete", file)
          })
        }
      }, 500)
    })
  }

  get url() {
    return this.inputTarget.getAttribute('data-direct-upload-url')
  }
}

So, if I attach a 1 megabyte 800x800 image...I'm expecting to get back a 50px image that looks pretty bad (due to resizeQuality 0.1).  However, I get back the same image I originally attached.  No compression or size changes at all.

Also, I'm curious if you know...by default will DropzoneJS upsize?  Or, is it smart enough to not upsize?  Also, is it smart enough to skip resize options for non-images?  The docs don't specify.

Perhaps this is better suited for StackOverflow.

Thanks!!!!