mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 18:24:52 -06:00
PERF: Use -ping
option to ImageMagick identify
command (#25713)
Why this change?
This adds the `-ping` option to the spots we missed in
cfdb461e9a
.
This commit is contained in:
parent
d119ec617e
commit
cc9480b24a
@ -414,6 +414,7 @@ class Upload < ActiveRecord::Base
|
||||
begin
|
||||
Discourse::Utils.execute_command(
|
||||
"identify",
|
||||
"-ping",
|
||||
"-format",
|
||||
"%Q",
|
||||
local_path,
|
||||
|
@ -147,7 +147,7 @@ RSpec.describe UploadCreator do
|
||||
describe "converting to jpeg" do
|
||||
def image_quality(path)
|
||||
local_path = File.join(Rails.root, "public", path)
|
||||
Discourse::Utils.execute_command("identify", "-format", "%Q", local_path).to_i
|
||||
Discourse::Utils.execute_command("identify", "-ping", "-format", "%Q", local_path).to_i
|
||||
end
|
||||
|
||||
let(:filename) { "should_be_jpeg.png" }
|
||||
|
Loading…
Reference in New Issue
Block a user