WordPress.org

Make WordPress Core

Opened 6 months ago

Last modified 4 months ago

#48788 new defect (bug)

Run time crop image not working using wp_get_image_editor

Reported by: ahmed17 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.3
Component: Media Keywords: reporter-feedback
Focuses: Cc:

Description

it's not working run time crop image

<?php
$editor = wp_get_image_editor($filePath);

$editor->set_quality($quality);

$editor->crop($srcX, $srcY, $srcW, $srcH, $destWidth, $destHeight);

$saved = $editor->save($destFileName);

=============================
Problem for "$editor->crop()" while source image size is smaller than destination image size.

<?php
$editor->crop($srcX, $srcY, $srcW, $srcH, $destWidth, $destHeight);

Change History (2)

This ticket was mentioned in ā€‹Slack in #core-media by antpb. ā€‹View the logs.


4 months ago

#2 @antpb
4 months ago

  • Keywords reporter-feedback added

Hello @ahmed17 ! Thanks so much for submitting your first ticket!

This ticket came up in a recent Media triage and there was a bit of clarity needed around what the expected behavior is vs what is happening for you currently. If you could provide a summary of what is expected and what is happening that would be most helpful. Iā€™m adding the reporter-feedback tag to this ticket so we can keep track that we are expecting more information still before moving this task forward.

Thanks again!

Note: See TracTickets for help on using tickets.