Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Images not displaying with Wampserver

Community Expert ,
Oct 14, 2019 Oct 14, 2019

I've been using Wampserver 2.5 on my Windows 7 computer successfully for years to preview PHP files in browser from Dreamweaver.
I just bought a Windows 10 laptop, and installed Dreamweaver (19.2.1), imported the sites, and installed the latest version of Wampserver, 3.1.9.

Everything works, except that images do not display in Live view (they do display in Design view), or when I preview in browser.

The console in Inspect element in browser lists a 404 for every image, although the image exists, and the path is correct.

It's probably some setting in Wampserver, but I have no idea where to look for it, and can't find anything relevant online.
My understanding of testing servers is very limited, but I can follow directions, if someone know hows to fix this. Thanks.

2.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 14, 2019 Oct 14, 2019

Is there an .htaccess file in your local site folder? 

If yes, rename it to 123.htaccess.

Translate
Community Expert ,
Oct 14, 2019 Oct 14, 2019

Hi Per,

What is the exact path to an image?

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 14, 2019 Oct 14, 2019

Hi Nancy,

 

I have two sites that use PHP pages, and on closer inspection, it turns out that only one of them has this problem.

 

This site previews without issues:  http://www.tinnmaalet.no/

Typical path:  <img src="../images/montessori/thumb/montessori-1-3-t.jpg" alt=""/>

 

This site doesn't display images:  http://perberntsen.com/

Typical path:  <img src="../generator1/thumbs/t-003-Fosse.jpg" alt="Generator, Fosse power station, 2007" width="150" height="117" />

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 14, 2019 Oct 14, 2019

The local site should reside in wamp/www/ folder.

Try this test document at root level.

 

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Image Test</title>
</head>

<body>
<p>Save to site root as image-test.php</p>

<h2>Absolute Link</h2>
<img src="http://perberntsen.com/_commercial/rjukan-notodden/thumbs/t-rju_2012-04-04_002.jpg" alt="thumbnail">
<hr>
<h2>Document-Relative Link</h2>
<img src="_commercial/rjukan-notodden/thumbs/t-rju_2012-04-04_002.jpg" alt="tumbnail">
<hr>
<h2>Site Root-Relative Link</h2>
<img src="/_commercial/rjukan-notodden/thumbs/t-rju_2012-04-04_002.jpg" alt="thumbnail">
</body>
</html>

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 14, 2019 Oct 14, 2019

I tried this, and the last two images displayed in Design view. No images displayed in Live view or preview.

The site folder is located inside the www folder, right next to the site that works.

 

While I was working with this, Dreamweaver started to act up, and went out of Split view when toggling between Design and Live view. And the shortcut I had assigned for this stopped working. Extremely frustrating when you're using a trackpad.

Then I reset the preferences, no change. So I uninstalled, and installed 19.1, no change.

Uninstalled, and installed 18.2.1, which didn't have the interface problems, but now nothing displayed in Live view.

 

FWIW, version 19.2 works without issues on my Windows 7 desktop.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 14, 2019 Oct 14, 2019

Is there an .htaccess file in your local site folder? 

If yes, rename it to 123.htaccess.

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 15, 2019 Oct 15, 2019
LATEST

Renaming the .htaccess file worked. Thank you, Nancy!

I also reinstalled the latest DW, and now it works better, but there are still problems with shortcuts.

Some work and some don't, and some even disappear from the Keyboard shortcuts dialog after I have assigned them.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines