• Resolved Uh Oh Spaghetti Os

    (@uh-oh-spaghetti-os)


    Hi there,

    I’m wondering if it is at all possible to upload an image to my WordPress site using FTP and still link to it on my page?

    There are images I need to use for the CSS, but I don’t want to add them to the admin panel media tab as I think that makes the admin side look a little messy

    Is there a directory I can upload my images to to link them using /images/imagename.jpg ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • should be possible.

    depending on your existing theme, you might need to create the /images folder first;

    example:

    /wp-content/themes/yourthemename/images

    Thread Starter Uh Oh Spaghetti Os

    (@uh-oh-spaghetti-os)

    Thanks for the reply
    I’m actually using twentytwelve, but when I’m trying to link images from the /images/ directory, they always appear as a broken link

    Inspecting the element shows the image link, but when I click on that, there’s a big red circle with a 1 in it next to the name, and no image

    I then try linking an image that exists, but it creates a new instance of the image and comes up with the same ‘1’

    https://screencast.com/t/Rtib34Cmwd

    EDIT: Forgot to add this in:
    The way I’m calling this image is:

    <img src="/images/green_smiley.png">

    Is this the correct syntax, or is there something I’m missing?

    Thread Starter Uh Oh Spaghetti Os

    (@uh-oh-spaghetti-os)

    I don’t know how I never managed to find this before, but I just stumbled upon some kind of ninja page through Google that explains my situation

    So, basically, the trick is to use the following:

    <img src="<?php bloginfo('template_directory'); ?>/images/imagename.ext">

    Here’s the page, in case anyone else has this issue and finds this post:
    https://www.brightcherry.co.uk/scribbles/wordpress-get-image-path-relevant-to-theme/

    Thanks again for the reply, alchymyth

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Using images without uploading them through the admin panel’ is closed to new replies.