画像のURLからitokトークンを削除するにはどうすればよいですか?
私はそれについて議論している記事を見つけましたが、それはDrupal 7(https://www.drupal.org/node/1934498)でのみ機能します。
一部の記事では、Drupalが画像のURLにトークンを追加する理由を説明しています。
画像のURLからitokトークンを削除するにはどうすればよいですか?
私はそれについて議論している記事を見つけましたが、それはDrupal 7(https://www.drupal.org/node/1934498)でのみ機能します。
一部の記事では、Drupalが画像のURLにトークンを追加する理由を説明しています。
回答:
itokパラメータを保持することをお勧めしますが、構成可能です。
構成image.settings設定を使用して出力からそれを抑制することができますsuppress_itok_output
  // The token query is added even if the
  // 'image.settings:allow_insecure_derivatives' configuration is TRUE, so
  // that the emitted links remain valid if it is changed back to the default
  // FALSE. However, sites which need to prevent the token query from being
  // emitted at all can additionally set the
  // 'image.settings:suppress_itok_output' configuration to TRUE to achieve
  // that (if both are set, the security token will neither be emitted in the
  // image derivative URL nor checked for in
  // \Drupal\image\ImageStyleInterface::deliver()).
$config['image.settings']['allow_insecure_derivatives'] = TRUE;
                    
$config['image.settings']['suppress_itok_output'] = TRUE;自分のサイトのsettings.phpファイルに追加しましたが、うまくいきました。