mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-23 02:51:13 +01:00
Change max. thumbnail dimensions to 640x360px (360p) (#19619)
This commit is contained in:
parent
03d9618595
commit
d0ba77047e
2 changed files with 4 additions and 4 deletions
|
@ -72,7 +72,7 @@ class MediaAttachment < ApplicationRecord
|
||||||
}.freeze,
|
}.freeze,
|
||||||
|
|
||||||
small: {
|
small: {
|
||||||
pixels: 160_000, # 400x400px
|
pixels: 230_400, # 640x360px
|
||||||
file_geometry_parser: FastGeometryParser,
|
file_geometry_parser: FastGeometryParser,
|
||||||
blurhash: BLURHASH_OPTIONS,
|
blurhash: BLURHASH_OPTIONS,
|
||||||
}.freeze,
|
}.freeze,
|
||||||
|
|
|
@ -157,9 +157,9 @@ RSpec.describe MediaAttachment, type: :model do
|
||||||
expect(media.file.meta["original"]["width"]).to eq 600
|
expect(media.file.meta["original"]["width"]).to eq 600
|
||||||
expect(media.file.meta["original"]["height"]).to eq 400
|
expect(media.file.meta["original"]["height"]).to eq 400
|
||||||
expect(media.file.meta["original"]["aspect"]).to eq 1.5
|
expect(media.file.meta["original"]["aspect"]).to eq 1.5
|
||||||
expect(media.file.meta["small"]["width"]).to eq 490
|
expect(media.file.meta["small"]["width"]).to eq 588
|
||||||
expect(media.file.meta["small"]["height"]).to eq 327
|
expect(media.file.meta["small"]["height"]).to eq 392
|
||||||
expect(media.file.meta["small"]["aspect"]).to eq 490.0 / 327
|
expect(media.file.meta["small"]["aspect"]).to eq 1.5
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'gives the file a random name' do
|
it 'gives the file a random name' do
|
||||||
|
|
Loading…
Reference in a new issue