wp_get_attachment image returns 'width="1" height="1"'
-
From the action “add_attachment” I call a function that gets run after the upload of an image.
In this function I use wp_get_attachment image.
Here wp_get_attachment_image returns the filename of the uploaded image in full resolution, even when I request the “medium”, and width=”1″ height=”1″ and ‘class=”attachment-medium”‘When I look into the upload-directory, the thumbnail sizes are correctly created.
Could this be a timing problem where the data is not yet written to the database at the time I request it so shortly after the upload?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘wp_get_attachment image returns 'width="1" height="1"'’ is closed to new replies.