フォーラムへの返信

1件の返信を表示中 - 1 - 1件目 (全1件中)
  • トピック投稿者 sakupan

    (@sakupan)

    アドバイスありがとうございます。
    根本的な知識がないため、

    if ( ! is_wp_error( $image ) ) {
    $image->rotate( 90 );
    $image->resize( 300, 300, true );
    $image->save( ‘new_image.jpg’ );
    }

    のあたりを

    else{
    //サイズをリサイズ
    $final_image = image_resize($first_img, 320, 320, true,”,”,100);
    //サーバー内のパスなので、ファイル名だけ取得
    $final_image = ‘/’.basename($final_image);
    }
    return $first_img;
    }

    このあたりと入れ替えたりと、いろいろ試しては見たのですが、できませんでした。
    もうしわけございませんが、引き続きアドバイスいただけましたら幸いです。

    よろしくお願いいたします。

1件の返信を表示中 - 1 - 1件目 (全1件中)