You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$user = \App\Models\User::factory()
->create();
$user
->addMedia(resource_path('dummy.pdf'))
->preservingOriginal()
->toMediaCollection();
$path = $user->getFirstMediaPath(conversionName: 'preview');
[$width, $height] = getimagesize($path);
$this->assertEquals(300, $width, 'The width of the conversion is not 300px.');
$this->assertEquals(300, $height, 'The height of the conversion is not 300px.');
The generated conversion is incorrect. Here are results from failed assertions:
1) The width of the conversion is not 300px.
Failed asserting that 1190 matches expected 300.
Expected :300
Actual :1190
2) The height of the conversion is not 300px.
Failed asserting that 1684 matches expected 300.
Expected :300
Actual :1684
kduma
changed the title
[11.x] Incorrect conversion results when used with GD driver
[11.x] Incorrect PDF conversion results when used with GD driver
Dec 22, 2023
Continuation of #3465.
With following configuration in User.php model:
Given the following test case: ExampleTest.php
The generated conversion is incorrect. Here are results from failed assertions:
Repository with test app: kduma-archive/test-laravel-medialibrary-failing-pdf
The text was updated successfully, but these errors were encountered: