# バナー画像に関して(Dawn)

**URL:** <https://community.shopify.com/t/dawn/398024>\
**Category:** 技術的なQ＆A\
**Tags:** css, html\
**Created:** [March 3, 2025, 5:41am UTC](https://community.shopify.com/t/dawn/398024 "2025-03-03T05:41:17Z")\
**Posts on this page:** 4\
**Page:** 1

## AI-generated summary

Dawnテーマ(v15.2.0)で画像バナーがPC表示時に荒く見える問題について質問が投稿されました。3000px以上の画像を使用してもPC側で画質が低下し、カスタムCSSでの対応も効果がなかったとのことです。

**原因:**
Dawnテーマの画像バナーに備わっている画像サイズ調整機能が原因と指摘されました。

**解決方法:**
`image-banner.liquid`ファイルを編集し、以下の2箇所を変更:
- 73-83行目の画像表示コードを`<img src="{{ section.settings.image | image_url }}">`に変更
- 105-115行目の画像表示コードを`<img src="{{ section.settings.image_2 | image_url }}">`に変更

これにより画像を直接表示し、画質の劣化を解消できるとの回答がありました。質問者が提示したアスペクト比調整部分は画質問題とは無関係と説明されています。

<div class="post-metadata">

**Author:** ![r000016](https://avatars.discourse-cdn.com/v4/letter/r/b9bd4f/32.png) [@r000016](https://community.shopify.com/u/r000016)\
**Post date:** [March 3, 2025, 5:41am UTC](https://community.shopify.com/t/dawn/398024/1 "2025-03-03T05:41:17Z")

</div>

お世話になっております。

テーマはDawn(バージョン15.2.0)使用しています。

画像バナーですが、3000px以上の画像を使用してもPCの表示の際、画像が荒く表示されてしまいます。  
（スマホは鮮明に表示されます）

この場合どのように対応したらよいでしょうか。

カスタムCSSで下記を入れても解決しません。  
@media screen and (min-width: 750px) {  
.banner–large {  
max-width: 1400px;  
margin: 0 auto;  
}  
}

お手数ですがご確認よろしくお願いします。

---

<div class="post-metadata">

**Author:** ![Qcoltd](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/qcoltd/32/900_2.png) [@Qcoltd](https://community.shopify.com/u/Qcoltd)\
**Post date:** [March 6, 2025, 7:19am UTC](https://community.shopify.com/t/dawn/398024/2 "2025-03-06T07:19:25Z")

</div>

@r000016 様

ご質問いただいている、画像が荒く見える件ですが、Dawnテーマの画像バナーに元々備わっている、

画像サイズを調整する部分が原因かと思われます。

テーマファイルのimage-banner.liquidを編集することが可能でしたら、

画像ファイルを直接表示するように調整することで対応も可能かと思われます。

ご参考まで。

（キュー小坂）

---

<div class="post-metadata">

**Author:** ![r000016](https://avatars.discourse-cdn.com/v4/letter/r/b9bd4f/32.png) [@r000016](https://community.shopify.com/u/r000016)\
**Post date:** [March 10, 2025, 3:14am UTC](https://community.shopify.com/t/dawn/398024/3 "2025-03-10T03:14:15Z")

</div>

コメントありがとうございます。

image-banner.liquid  
下記のminとmaxの部分を大きなサイズに変更すれば問題ないでしょうか。  
お手数ですがご確認よろしくお願いします。

{%- if section.settings.image\_height == ‘adapt’ and section.settings.image != blank -%}  
{%- style -%}  
@media screen and (max-width: 749px) {  
#Banner-{{ section.id }}::before,  
#Banner-{{ section.id }} .banner\_\_media::before,  
#Banner-{{ section.id }}:not(.banner–mobile-bottom) .banner\_\_content::before {  
padding-bottom: {{ 1 | divided\_by: section.settings.image.aspect\_ratio | times: 100 }}%;  
content: ‘’;  
display: block;  
}  
}

@media screen and (min-width: 750px) {  
#Banner-{{ section.id }}::before,  
#Banner-{{ section.id }} .banner\_\_media::before {  
padding-bottom: {{ 1 | divided\_by: section.settings.image.aspect\_ratio | times: 100 }}%;  
content: ‘’;  
display: block;  
}  
}

---

<div class="post-metadata">

**Author:** ![Qcoltd](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/qcoltd/32/900_2.png) [@Qcoltd](https://community.shopify.com/u/Qcoltd)\
**Post date:** [March 10, 2025, 9:23am UTC](https://community.shopify.com/t/dawn/398024/4 "2025-03-10T09:23:50Z")

</div>

@r000016 様

ご記載いただいたきました箇所は「画像のアスペクト比を維持しつつ、レスピン支部に高さを調整」する箇所のため、画像表示の部分とは異なります。

画像を表示している対象箇所はDawn15.3.0のデフォルト状態で、「image-banner.liquid」の73行目から83行目の

```markup
{{
        section.settings.image
        | image_url: width: 3840
        | image_tag:
          width: section.settings.image.width,
          height: image_height,
          class: image_class,
          sizes: sizes,
          widths: widths,
          fetchpriority: fetch_priority
      }}

```

を

```markup

```

に変更。

105行目から115行目の

```markup
{{
        section.settings.image_2
        | image_url: width: 3840
        | image_tag:
          width: section.settings.image_2.width,
          height: image_height_2,
          class: image_class_2,
          sizes: sizes,
          widths: widths,
          fetchpriority: fetch_priority
      }}

```

を

```markup

```

に変更いただければ、画像の滲みは解消されるかと思います。

ご参考まで。

（キュー小坂）
