Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix image resize #622

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions config/packages/monolog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,15 @@ when@prod:
type: fingers_crossed
action_level: error
handler: nested
excluded_http_codes: [404, 405]
excluded_http_codes: [ 404, 405 ]
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
nested:
type: stream
path: php://stderr
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
formatter: monolog.formatter.json
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine"]
deprecation:
type: stream
channels: [deprecation]
path: php://stderr
formatter: monolog.formatter.json
channels: [ "!event", "!doctrine" ]

2 changes: 2 additions & 0 deletions src/Service/Image/GdService.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@ private function getQuarterRotation(string $sourcePath): int
$exif = exif_read_data($sourcePath);
if (!empty($exif['Orientation'])) {
return match ($exif['Orientation']) {
1 => 0,
3 => 2,
6 => 3,
8 => 1,
default => 0, // cannot handle non-90% rotations
};
}
}
Expand Down
Loading