get_attachment_s3_info() public method

Get attachment s3 info
public get_attachment_s3_info ( integer $post_id ) : mixed
$post_id integer
return mixed
 /**
  * Replace local URLs with S3 ones for srcset image sources
  *
  * @param array  $sources
  * @param array  $size_array
  * @param string $image_src
  * @param array  $image_meta
  * @param int    $attachment_id
  *
  * @return array
  */
 public function wp_calculate_image_srcset($sources, $size_array, $image_src, $image_meta, $attachment_id)
 {
     if (!($s3object = $this->as3cf->get_attachment_s3_info($attachment_id))) {
         // Attachment not uploaded to S3, abort
         return $sources;
     }
     foreach ($sources as $width => $source) {
         $filename = basename($source['url']);
         $size = $this->find_image_size_from_width($image_meta['sizes'], $width, $filename);
         $s3_url = $this->as3cf->get_attachment_s3_url($attachment_id, $s3object, null, $size, $image_meta);
         if (false === $s3_url || is_wp_error($s3_url)) {
             continue;
         }
         $sources[$width]['url'] = $s3_url;
     }
     return $sources;
 }