Don’t use a relative URL. If you look at the source you are probably trying to load the image from http://sitename.com/images/
when what you likely want is http://sitename.com/wp-content/themes/themename/images/
. Assuming the image is in the theme directory in a folder that shares a directory with style.css
, do this:
<img id="topL" src="https://wordpress.stackexchange.com/questions/78271/<?php echo get_stylesheet_directory_uri(); ?>/images/img01.png"/>
http://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri
Related Posts:
- How to set twenty fourteen header image at 100% width?
- Display different header images based on current page
- How can I use cached images in an AJAX response?
- WordPress 4.1 header image problem
- How do I get my main image to stretch the full length of the screen?
- How to remove header images from displaying (not css or editing)?
- Logo is not being displayed in header (Twentytwelve)
- Placing a featured image into header
- Featured image not shown in header
- Responsive header image
- How can I change the header on the pages?
- Change header image size
- Adding custom html/css/images to Theme
- How to add an image below the header on homepage
- Put image onto header
- Changing logo image in header.php upon language detection
- How to get customable image header?
- WordPress Site Broken and it gives Headers Already sent error
- get the attachement url for the medium sized image
- Each custom image size in custom upload directory?
- Is there a simple way to just insert a link to an image (without inserting an image)?
- Watermarking Images with WordPress with WP_Image_Editor
- Get attachment/image info in JS
- Auto-modifying original [full size] images
- How to limit number of images being printer out in “Set Featured Image” pop up?
- Crop image to horizontal or vertical by code based on image size
- Pasting images removes class attribute
- Open the attachment details modal
- Crop image without scaling or resizing with add_image_size()
- Download button for Featured Image in every post – automatically
- How to make programmatic image upload generate thumbnail and sizes?
- Editing built in Gallery shortcode to filter by categories
- Random popup image per user with no repeat
- Speed of the slider images should be increased in wordpress
- Get full image array
- attach unattached featured images to respective posts
- Display number of images actually posted
- Confusion about arguments sent to add_image_size
- Is it possible to pull and display a single landscape oriented image
- Remove image classes from post thumbnail output
- change the $content_width
- Different image sizes for home and post pages
- Show full image thumbnail
- upload featured image in custom post type from frontend
- Make medium_large images available to insert into post
- Removing height and width from images with a caption
- Images not showing on blog
- Why does Google Image Search still display my images?
- Responsive Header for Phone
- Dynamic tagged image galleries
- WP fails to upload files to media library, /wp-admin/async-upload.php 403 forbidden
- Images stopped loadding after adding SSl
- GoDaddy Number of Image Files Per Directory Exceeded
- Post and featured image have the same name, why is the attachment (image) is showing and not the post?
- add_image_size wont work after get_intermediate_image_sizes
- Ways to show multiple, separate galleries per post?
- Stop WordPress from cropping images using url parameters
- How to get the image-URL from Media-Upload in a post?
- How to get the Gallery form/section just like in Gutenberg block?
- One of my image sizes isn’t showing up in srcset
- Conflict with single and double quotes
- Featured Image Cetegory Not Shown In WordPress
- How do I get a smaller size of an avatar image
- download link for uploaded images for wordpress
- Force default OG:Image – Yoast SEO [closed]
- after migration, newly uploaded images won’t show up
- Why do I have blury images in WordPress
- Disable save as image on smartphones using all browsers ( chrome, firefox, ie, cm, opera )
- How to get the title of the random images from media library?
- How To Display Author Photo In WordPress without any plugin?
- Allow users to upload multiple images to their profile
- how to change format jpg to webp?
- User uploads image as “Featured Image” but WordPress resizes it?
- Implementing a modal(lightbox) for all images in all post-gallery posts
- Hide Title tag on image Hover
- How to increase media image scale limit?
- Force WordPress to always generate a thumbnail for original image
- How to get the best resolution of image from srcset
- File upload size limit in wordpress and php.ini limit
- How to add php to theme to show alt attributes
- Display Title/Description/Caption of custom images on homepage
- Blank image thumbnails in media library
- Getting extra image links in code with wp_get_attachment_image
- featured image in custom poste type (backend)
- Dinamically modifying attributes of images on posts
- Run command to optimize images after they get uploaded to WordPress
- How decrease the size of images which are present in uploads folder?
- Large size is not honoured when inserting image
- Issue uploading images
- The most of the images don’t appear, although URLs are correct
- Get images uploaded to this post in popup on editor screen
- Remove “align” attribute on images
- WordPress Images | How to get the cropped image?
- How do I add a nested conditional within an echo – to use a default image if there isn’t one in the post?
- How do I change a Themes Header Image?
- Some images 404
- Blurry Images WordPress 5.8.1
- How to show file size of featured image? [duplicate]
- Uncaught Error: Call to undefined function file_is_valid_image()
- Remove one srcset entry from wp_get_attachment_image