Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

134
Views
How to use vue-quill image compressor module

I'm using the BlotFormatter module with vue-quill. And it is working. I tried to add the image compressor module too and upload a large image but it is not being compressed. I think I have done something wrong. This is the way I included it in my project,

<script setup>
import { QuillEditor } from "@vueup/vue-quill";
import ImageCompress from "quill-image-compress";
import BlotFormatter from "quill-blot-formatter";
import "@vueup/vue-quill/dist/vue-quill.snow.css";

const modules = {
  name: "blotFormatter",
  module: BlotFormatter,
  options: {
    /* options */
  },
  imageCompress: {
    quality: 0.7, // default
    maxWidth: 1000, // default
    maxHeight: 1000, // default
    imageType: "image/jpeg", // default
    debug: true, // default
    suppressErrorLogging: false, // default
    insertIntoEditor: undefined, // default
  },
};
</script>

<template>
 <QuillEditor
   ref="quillEditorRef"
   v-model:content="articleForm.description"
   theme="snow"
   toolbar="full"
   contentType="html"
   :modules="modules"
 />
</template>

Really appreciate it if somebody could guide me to install this module properly. Thanks

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Just put the modules inside an array.Separate all modules as objects.

const modules = [
  {
    name: "ImageCompress",
    module: ImageCompress,
    options: {
      quality: 0.7, // default
      maxWidth: 1000, // default
      maxHeight: 1000, // default
      imageType: "image/jpeg", // default
      debug: true, // default
      suppressErrorLogging: false, // default
      insertIntoEditor: undefined, // default
    },
  },
  {
    name: "BlotFormatter",
    module: BlotFormatter,
    options: {},
  },
];const modules = [
  {
    name: "ImageCompress",
    module: ImageCompress,
    options: {
      quality: 0.7, // default
      maxWidth: 1000, // default
      maxHeight: 1000, // default
      imageType: "image/jpeg", // default
      debug: true, // default
      suppressErrorLogging: false, // default
      insertIntoEditor: undefined, // default
    },
  },
  {
    name: "BlotFormatter",
    module: BlotFormatter,
    options: {},
  },
];
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!