-1

MVC4アプリにimageresizerを追加しましたが、以下のような画像タグの場合、サイズ変更は行われません。URLをブラウザに直接貼り付けると、サイズが変更されます。

<img class="store-display-image" src="/Images/ToughBook.jpg?width=130">

どうしてこれなの?ルーティングがimageresizerを混乱させているのではないかと思いますが、指示に従ってルーティングシムをインストールしました。診断URL/resizer.debug.ashxは、NoCacheが設定されていることを警告するだけです。

4

1 に答える 1

0

As the same HTTP request occurs both ways (except for the Referer header, which is irrelevant here), it's impossible for your statement to be true.

One of the following must be happening:

  1. Your 'store-display-image' css class contains client-size width/height settings that are overriding the true size of the image.
  2. Neither image is being resized (perhaps you're running IIS6 or IIS7 Classic - see the docs for supporting that), but your browser is automatically resizing the 'address bar' version to fit inside the window.
  3. Your page has a 'base' tag that is changing the 'src' value.
  4. You're just making a typo somewhere.

To avoid downvotes on future questions, I suggest providing more detailed information, such as the exact URL you used in the address bar, the css for 'store-display-image', the document URL containing the img tag, your server details, and a copy of your diagnostics page.

I also suggest showing effort to simplify the circumstances, such as trying an empty HTML page and simple element with no CSS applied, and (for strange situations like this), screenshots of both situations.

于 2012-09-24T04:52:39.773 に答える