Currently I'm trying to take screenshots of websites. That works great by using mshots and media_handle_sideload.
However these screenshots need to be associated with my post. I've made a function called
and passed the $post_id into the function
$id = media_handle_sideload( $file_array, $post_id);
Now the returned value for $id is incremented by 1 from $post_id, e.g. $post_id is 200 and $id is 201. Is it not supposed to be the same id?