[wp-trac] [WordPress Trac] #42922: Image Scaling using get_the_post_thumbnail issue in Wordpress
WordPress Trac
noreply at wordpress.org
Sun Dec 17 08:22:38 UTC 2017
#42922: Image Scaling using get_the_post_thumbnail issue in Wordpress
--------------------------+-----------------------------
Reporter: rigids.php | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.9.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Issue URL - http://www.creativescripters.com/clients/testwp/uncategorized
/image-resized/
I am using wordpress (self hosted) latest version, The problem is I am
looking to get a thumbnail from the resized/scaled image, and when I do
that wordpress returns the test-150x150.jpg i.e. Thumbnail from the
original image and not the resized image which should have been
test-e1513229707262-150x150.jpg
Step to reproduce the issue
1. Upload an image , Scale it (click edit on uploaded image and change
width and click scale). Wordpress will rename the image and add an Suffix
Id to the name so you can confirm the image have been scaled. for eg if
you uploaded test.jpg after scaling image name will become test-
randomstring.jpg
[![enter image description here][1]][1]
2. When I call get_the_post_thumbnail($post, 'full') I get the correct
image The resized one i.e. test-randomstring.jpg
[![enter image description here][2]][2]
3. When I try to get a different size of the scaled image for eg I need
thumbnail generated from the image size and I call function
get_the_post_thumbnail($post, 'thumbnail') wordpress return the THUMBNAIL
from actual image (the one I uploaded initially test.jpg and not the
resized one test-randomstring.jpg)
Screenshot - https://i.imgur.com/sQKoZcF.png
[1]: https://i.stack.imgur.com/TTIaG.png
[2]: https://i.stack.imgur.com/T3vPE.png
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42922>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list