• I just installed WP 4.5.3 on my localhost running Kubuntu 16.10. When I try to insert an image, I can’t find anything to use but “upload files’, so I try that. I pick a file on the localhost and something happens, but there is just a gray box with a checkmark in it. No image shows. The post just displays the image’s file name.

    I admit to not knowing what ‘upload files’ means on a single host.

    So how do you use images on a localhost?

    Thanks in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter joneall

    (@joneall)

    I just noticed that the URL which is being used is

    https://localhost/deva-wp/index.php/2016/07/30/new-post/01-annapurna_ac13_500m/

    Also, nothiing is in wp-contents. Again, I do not know what it means to ftp to a local host.

    Thread Starter joneall

    (@joneall)

    And I can find no way to modify that URL.

    you need to add this code <?php bloginfo(‘template_directory’); ?> on each image which you put in temp file.

    like
    <img src=”<?php bloginfo(‘template_directory’); ?>/images/magazine/ad.jpg” alt=”Ad”>

    Hello “joneall”, this is a common problem with localhost servers, usually they don’t have an FTP server running.
    The easiest way around this is to just install your images into your own webserver files directories. So just copy your images into a directory “wp-content/uploads/”, or if you prefer “images” in your website root, add the date nested directories if this suits you.

    Abdul Samad

    (@abdul-samad-k-t)

    If you like to use image on your website, you need to upload it to media library first. To do this goto wordpress dashboard->media library->add new. Then only you can use it in your pages. When you add like this, your image files go to “wp-content/uploads/” folder

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to use images on localhost install’ is closed to new replies.