質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
HTML5

HTML5 (Hyper Text Markup Language、バージョン 5)は、マークアップ言語であるHTMLの第5版です。

Webサイト

一つのドメイン上に存在するWebページの集合体をWebサイトと呼びます。

GitHub

GitHubは、Gitバージョン管理システムを利用したソフトウェア開発向けの共有ウェブサービスです。GitHub商用プランおよびオープンソースプロジェクト向けの無料アカウントを提供しています。

JavaScript

JavaScriptは、プログラミング言語のひとつです。ネットスケープコミュニケーションズで開発されました。 開発当初はLiveScriptと呼ばれていましたが、業務提携していたサン・マイクロシステムズが開発したJavaが脚光を浴びていたことから、JavaScriptと改名されました。 動きのあるWebページを作ることを目的に開発されたもので、主要なWebブラウザのほとんどに搭載されています。

jQuery

jQueryは、JavaScriptライブラリのひとつです。 簡単な記述で、JavaScriptコードを実行できるように設計されています。 2006年1月に、ジョン・レシグが発表しました。 jQueryは独特の記述法を用いており、機能のほとんどは「$関数」や「jQueryオブジェクト」のメソッドとして定義されています。

Q&A

0回答

1395閲覧

GitHubPagesでWebサイトを公開したら画像が表示されない

taiki5324

総合スコア0

HTML5

HTML5 (Hyper Text Markup Language、バージョン 5)は、マークアップ言語であるHTMLの第5版です。

Webサイト

一つのドメイン上に存在するWebページの集合体をWebサイトと呼びます。

GitHub

GitHubは、Gitバージョン管理システムを利用したソフトウェア開発向けの共有ウェブサービスです。GitHub商用プランおよびオープンソースプロジェクト向けの無料アカウントを提供しています。

JavaScript

JavaScriptは、プログラミング言語のひとつです。ネットスケープコミュニケーションズで開発されました。 開発当初はLiveScriptと呼ばれていましたが、業務提携していたサン・マイクロシステムズが開発したJavaが脚光を浴びていたことから、JavaScriptと改名されました。 動きのあるWebページを作ることを目的に開発されたもので、主要なWebブラウザのほとんどに搭載されています。

jQuery

jQueryは、JavaScriptライブラリのひとつです。 簡単な記述で、JavaScriptコードを実行できるように設計されています。 2006年1月に、ジョン・レシグが発表しました。 jQueryは独特の記述法を用いており、機能のほとんどは「$関数」や「jQueryオブジェクト」のメソッドとして定義されています。

0グッド

0クリップ

投稿2020/06/14 14:46

前提・実現したいこと

GitHubPagesでjQuery(bgSwitcher)を実装したWebサイトを公開したい

発生している問題・エラーメッセージ

GitHubPagesにHTML,CSS,JSファイル,画像データをアップロード後、URLを開くと画像が表示されませんでした。

該当のソースコード

◆GitHub◆
GitHubのコード

◆URLの検証画面◆
URLの検証コード

◆VSCode◆
VSCode

試したこと

ファイルパスの問題かと思い、以下を試しました。
・GitHubの当該リポジトリにアップロードした画像を開き、画像アドレスをコピペ
・GitHubの当該リポジトリにアップロードした画像のリンクのアドレスをコピペ
・imageフォルダからではなく、1つずつ画像をHTMLファイルと同じ階層のディレクトリにアップロードし直し、画像ファイル名(003-1.jpg)をHTMLファイルに記載

補足情報(FW/ツールのバージョンなど)

OS:Windows10
ブラウザ:Chrome

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

unoSSkR

2020/06/15 06:54 編集

Try some efforts and then what happened? No need to access to raw URLs like raw.githubusercontent.com/username/project/master/content, because it is just "content" of the project inside HTMLs when relative URL description is correctly specified. You may write img src="/<project>/image/under-1.jpg", for example, to access your images under image directory on GitHubPages. HTH
taiki5324

2020/06/16 08:30

thank you for your answer. The image was not displayed even if I performed the three things I tried in the first post. The image was not displayed even if the code in the script tag in HTML was described as images: [img src = "/ <project> /image/under-1.jpg"]. Paste the URL of my project. https://taiki5324.github.io/Takuro_Shizen.github.io/ Would you check it if possible? This sentence is translated from Japanese to English by google translation.BR
unoSSkR

2020/06/16 08:51

Look carefylly. you have to specify, say [img src = "/Takuro_Shizen.github.io/image/under-1.jpg"], but at this moment the under-1.jpg doesnt exist under image directory in your github repository.
taiki5324

2020/06/16 09:48

Certainly under-1.jpg does not exist under the directory. Even if you specify under-2.jpg that exists under the directory, the image will not be displayed. The image is displayed even if under-2.jpg is placed in the same directory as index.html instead of under the image directory and [img src = "/Takuro_Shizen.github.io/under-2.jpg"] is specified. Was not done This sentence is translated from Japanese to English by google translation.BR
unoSSkR

2020/06/16 10:28

Look carefully again for all things. Do the same way for js stuffs. You dont have js directory and its contents including Query.bgswicher.js in your github repository, but your index.html indicated Query.bgswicher.js under js directory. You should take care both all files you have specied in your sources and all files you have uploaded onto github repogitory.
taiki5324

2020/06/18 14:21

As I said, I reviewed everything. There was a misunderstanding that the description had to be a little different from what was written in the editor to display the image, so I made modifications to the HTML content after uploading it on github. I deleted the repository and uploaded it again. The problem is resolved and the image is displayed. Thank you so much for letting me know. This sentence is translated from Japanese to English by google translation.BR
unoSSkR

2020/06/19 05:19

Well done if giving your result.
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問