• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

image optimizer plugin - requests

Scheduled Pinned Locked Moved Plugin Requests
17 Posts 10 Posters 5.5k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • lombisiL Offline
    lombisiL Offline
    lombisi
    wrote on last edited by
    #1

    Features

    • Automatically scales large image uploads to a more "sane" size
    • Bulk-resize feature to selectively resize existing images
    • Allows configuration of max width/height and jpg quality

    e.g / wp plugin: https://wordpress.org/plugins/imsanity/

    KosiakK 1 Reply Last reply
    5
  • KosiakK Offline
    KosiakK Offline
    Kosiak
    replied to lombisi on last edited by
    #2

    @lombisi +1
    A lot of similar WP plugins:
    https://wordpress.org/plugins/resize-image-after-upload/
    https://wordpress.org/plugins/imagify/

    1 Reply Last reply
    1
  • lombisiL Offline
    lombisiL Offline
    lombisi
    wrote on last edited by
    #3

    up 😕

    1 Reply Last reply
    0
  • nhl.plN Offline
    nhl.plN Offline
    nhl.pl
    wrote on last edited by
    #4

    There is a hook for image resize which makes a plugin possible.
    https://github.com/NodeBB/NodeBB/wiki/Hooks#image

    And more from Julian.

    We don't have any client-side image editing tools at the moment
    https://github.com/NodeBB/NodeBB/issues/3819#issuecomment-160369705

    1 Reply Last reply
    2
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #5

    As @nhl-pl says, there are some hooks that you may want to utilise. The image resize hook specifically is only called whenever resizeImage is called in NodeBB, which is mainly for user profile updates. If you're thinking of a more generic resizing (i.e. applicable to all locally uploaded images), then we might have to create a static hook to be fired when an image is finished uploading.

    1 Reply Last reply
    0
  • nhl.plN Offline
    nhl.plN Offline
    nhl.pl
    wrote on last edited by
    #6

    It's worth mentioning there are some Node.js modules which can be used as dependencies.

    The fastest Node.js module for resizing JPEG, PNG, WebP and TIFF images.
    https://github.com/lovell/sharp

    And here an example how it can be used.

    On-the-fly image resizing using Node.js and GraphicsMagick.
    https://github.com/jimmynicol/image-resizer

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #7

    Alternatively, if you don't wish to add dependencies, you can use jimp, which is already installed in NodeBB:

    var jimp = module.parent.require('jimp');
    
    PitaJP 1 Reply Last reply
    1
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    replied to julian on last edited by PitaJ
    #8

    @julian don't do this or recommend doing this. Add the package to your deps and require it normally. npm can decide to install it or not.

    Never rely on other modules' deps to be stable.

    1 Reply Last reply
    3
  • S Offline
    S Offline
    sohpingting
    wrote on last edited by sohpingting
    #9

    Need this plugin badly because for most of our post, we have screenshot of images.

    Possible to have a plugin that can resize and compress images at the same time?

    Compress images: https://tinypng.com/ has a nodejs package

    1 Reply Last reply
    0
  • ilblogI Offline
    ilblogI Offline
    ilblog
    wrote on last edited by
    #10
    This post is deleted!
    1 Reply Last reply
    0
  • ilblogI Offline
    ilblogI Offline
    ilblog
    wrote on last edited by ilblog
    #11
    This post is deleted!
    julianJ 1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    replied to ilblog on last edited by
    #12

    @ilblog Core already resizes images, doesn't it?

    ilblogI 1 Reply Last reply
    0
  • ilblogI Offline
    ilblogI Offline
    ilblog
    replied to julian on last edited by
    #13

    @julian Maybe yes, we will try

    ilblogI 1 Reply Last reply
    0
  • ilblogI Offline
    ilblogI Offline
    ilblog
    replied to ilblog on last edited by
    #14

    @ilblog Hmm we have "Request Entity Too Large" error message trying to upload 1.6Mb pic. Running 1.11.1. Will ask or admins.

    MJM 1 Reply Last reply
    0
  • The WormsT Offline
    The WormsT Offline
    The Worms GNU/Linux
    wrote on last edited by
    #15

    Check your config https://yourwebsite/admin/settings/uploads

    1 Reply Last reply
    0
  • MJM Offline
    MJM Offline
    MJ
    replied to ilblog on last edited by
    #16

    @ilblog said in image optimizer plugin - requests:

    @ilblog Hmm we have "Request Entity Too Large" error message trying to upload 1.6Mb pic. Running 1.11.1. Will ask or admins.

    If you use Nginx check here for solution that worked for me.

    1 Reply Last reply
    1
  • volanarV Offline
    volanarV Offline
    volanar Translator
    wrote on last edited by volanar
    #17

    Can this be repeated on nodebb?
    https://blog.discourse.org/2021/07/faster-user-uploads-on-discourse-with-rust-webassembly-and-mozjpeg/

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development