Skip to content

Commit

Permalink
Correct image size
Browse files Browse the repository at this point in the history
karissademi committed Oct 24, 2024
1 parent 3b01324 commit 4a47d64
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -117,7 +117,7 @@ public function prepare_item_for_response( $post, $request ) {
if (isset( $schema['properties']['featured_image'] )) {
$featured_image_id = get_post_thumbnail_id($post);
if (wp_get_attachment_image_src($featured_image_id)) {
$medium_featured_image_url = wp_get_attachment_image_src($featured_image_id);
$medium_featured_image_url = wp_get_attachment_image_src($featured_image_id, 'medium');
$post_data['featured_image'] = (string) $medium_featured_image_url[0];
}
}

0 comments on commit 4a47d64

Please sign in to comment.