How to disable the img resizing when uploading the topic thumbnails?
-
Don't think there's a way in core. You can do this using the
filter:image.resize
hook though. I use this on some themes. This works on profile images too.{ "hook": "filter:image.resize", "method": "imageResize" },
theme.imageResize = function (data, next) { next(null, data) }
-
@Jam you can modify core a bit to disable image resize for topic thumbnails.
comment out the call to image.resizeImage on this line
https://github.com/NodeBB/NodeBB/blob/master/src/controllers/uploads.js#L135
and move these outside... https://github.com/NodeBB/NodeBB/blob/master/src/controllers/uploads.js#L145-L149
-
@pichalite said in How to disable the img resizing when uploading the topic thumbnails?:
@Jam you can modify core a bit to disable image resize for topic thumbnails.
comment out the call to image.resizeImage on this line
https://github.com/NodeBB/NodeBB/blob/master/src/controllers/uploads.js#L135
and move these outside... https://github.com/NodeBB/NodeBB/blob/master/src/controllers/uploads.js#L145-L149
hi, do you mean that i make a simple plugin to hook
filter:image.resize
and do noting in it like @yariplus said above, can not stop resizing the thumbnail img?