#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Location
    Virginia Beach Virginia
    Posts
    11
    Rep Power
    0

    Question HTML files lose images when compressed


    I have created a couple of web pages for an assignment of mine, and they look and function spot-on. The problem is that my instructor wants them submitted in a compressed zip file, and whenever I compress the folder the web pages come out basic white with black text, and little boxes where the images should be. The image files are all in a folder called images inside of my project folder, and the paths are all correct until I zip the folder, and then all of a sudden it cannot find the image files anymore.
    Can someone PLEASE explain to me how to post two HTML pages that are not to be published online, to the assignments page without completely ruining all the work I did to make them look good??
  2. #2
  3. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,136
    Rep Power
    1990
    Sounds like your ZIP program is broken or not embedding the images correctly. When you've extracted the ZIP'ed files, does the file and folder structure match what you ZIP'ed in the first place?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Location
    Virginia Beach Virginia
    Posts
    11
    Rep Power
    0

    Red face


    Originally Posted by Catacaustic
    Sounds like your ZIP program is broken or not embedding the images correctly. When you've extracted the ZIP'ed files, does the file and folder structure match what you ZIP'ed in the first place?
    I am fairly new to this to be honest, but I am not using an external compression utility, it is the one that came with Windows 7.
    I have to admit, I am not precisely sure how to check if the file structure has been altered or not??
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Location
    Virginia Beach Virginia
    Posts
    11
    Rep Power
    0

    Unhappy


    Originally Posted by Catacaustic
    Sounds like your ZIP program is broken or not embedding the images correctly. When you've extracted the ZIP'ed files, does the file and folder structure match what you ZIP'ed in the first place?
    I do not believe it is the fault of the compression utility, because it is doing the same thing with 7zip....
    Is there no possible way to zip a folder containing HTML files with images, and keep it correct??
  8. #5
  9. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Location
    Pennsylvania, USA
    Posts
    35
    Rep Power
    2
    I think your instructor will unzip them before viewing, no?

    The problem you are having is the web browser can only see the base *.html file and none of the support files for your HTML page to display properly.

    This happens because, when you click one file in the zip program it is placed alone by itself in a temporary folder and then the web browser tries to display the file without having access to any of its support files (e.g., CSS and images).

    The web browser cannot properly resolve an HTML page while it is still zipped. It must be first unzipped to a specified folder and then loaded into the web browser from there. Make sure though that you use relative paths to all your support files so that it does not matter where the zip contents are unzipped by the person examining your assignment.

    Regards - Shawn - robowhiz.info
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Location
    Virginia Beach Virginia
    Posts
    11
    Rep Power
    0

    Question


    Originally Posted by dynamicflash
    I think your instructor will unzip them before viewing, no?

    The problem you are having is the web browser can only see the base *.html file and none of the support files for your HTML page to display properly.

    This happens because, when you click one file in the zip program it is placed alone by itself in a temporary folder and then the web browser tries to display the file without having access to any of its support files (e.g., CSS and images).

    The web browser cannot properly resolve an HTML page while it is still zipped. It must be first unzipped to a specified folder and then loaded into the web browser from there. Make sure though that you use relative paths to all your support files so that it does not matter where the zip contents are unzipped by the person examining your assignment.

    Regards - Shawn - robowhiz.info
    I am not using an external CSS file, but instead it is internal style coding. The real issue is that I am supposed to place the company logo on the webpages, and instead I am getting a little box where the image goes instead....
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Location
    Virginia Beach Virginia
    Posts
    11
    Rep Power
    0
    Originally Posted by dynamicflash
    I think your instructor will unzip them before viewing, no?

    The problem you are having is the web browser can only see the base *.html file and none of the support files for your HTML page to display properly.

    This happens because, when you click one file in the zip program it is placed alone by itself in a temporary folder and then the web browser tries to display the file without having access to any of its support files (e.g., CSS and images).

    The web browser cannot properly resolve an HTML page while it is still zipped. It must be first unzipped to a specified folder and then loaded into the web browser from there. Make sure though that you use relative paths to all your support files so that it does not matter where the zip contents are unzipped by the person examining your assignment.

    Regards - Shawn - robowhiz.info
    Thanks a million yo, that was it, and when I took the extracted folder, and moved it to my desktop and opened it, everything worked fine!!

IMN logo majestic logo threadwatch logo seochat tools logo