mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 00:15:46 +01:00
took out the meta config check from image.js
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
var fs = require('fs'),
|
||||
gm = require('gm').subClass({imageMagick: true}),
|
||||
meta = require('./meta');
|
||||
gm = require('gm').subClass({imageMagick: true});
|
||||
|
||||
var image = {};
|
||||
|
||||
@@ -28,8 +27,7 @@ image.resizeImage = function(path, extension, width, height, callback) {
|
||||
};
|
||||
|
||||
image.convertImageToPng = function(path, extension, callback) {
|
||||
var convertToPNG = parseInt(meta.config['profile:convertProfileImageToPNG'], 10);
|
||||
if(convertToPNG && extension !== '.png') {
|
||||
if(extension !== '.png') {
|
||||
gm(path).toBuffer('png', function(err, buffer) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
|
||||
Reference in New Issue
Block a user