Manual

Table of Contents

This is the manual of Image Source Control (ISC), our plugin for WordPress to help you to never forget to add the copyright information for an image on your blog.

1. How the plugin works

Image Source Control allows you to manage image source information for all images on your blog. You can find the input fields for the copyright holder, links to their website, and other options when editing the image block in the block editor or when viewing the image in the media library.

You can choose one of more of the following methods to show image sources:

  • List all sources of the current page
  • Show an overlay with the source above the image
  • List all image sources from your whole site on a dedicated page

ISC creates an index of pages and the images they contain. This index is used when the plugin warns about missing sources or creates the full image source list.

The page-image index is created when someone visits a page for the first time after the index process started. Depending on the number of posts and visitors, it might take some time to create the full index.

2. First Steps

After installing and activating Image Source Control, follow these steps to see how and if the plugin works properly.

  1. Go to Settings > Image Source and choose where and how you want to display image sources
  2. Select an image under Media > Library and fill in the appropriate image source fields
  3. Go to a post in which you are using the image in the main content
  4. If you choose Image source list or Overlay as a method, you should find the image source visible on the page. If not, clear your page cache.
  5. If you choose the List with all sources method and placed the shortcode on the page, visit it to find the newly added source information
  6. Read the other information and especially Issues and Debugging section if you are experiencing any issues
  7. Reach out to us if you need further help

3. Settings

Find the plugin settings under Settings > Image Sources.

3.1 Position of the image sources

Choose how and where ISC should display image sources. We recommend using only one of the methods or combine them with a dedicated page hosting the image source of your whole website.

Each method to show image sources comes with additional options to fine-tune it.

3.1.1 Image source list

Display a list of sources for images on the current page. You can decide whether to place the list manually using the shortcode or add it automatically below each post and page.

If you are an experienced frontend developer, you can also use the PHP function in your template files to place the source list:

<?php if( function_exists('isc_list') ) { isc_list(); } ?>
Code language: HTML, XML (xml)
Archive pages

You can choose whether and how to display image sources on archive pages like the category feed.

Keep the following things in mind:

  • Even if your theme doesn’t display post thumbnails on archive pages, the source might still be displayed
  • If other parts of your site query the excerpt, the source string might be given by them too. The best way to prevent this is by using the function isc_thumbnail_source() in your template instead.

3.1.2 Overlay

Display the image source as an overlay. This feature only works for images in the content and should always be combined with the full list of all sources since script conflicts might cause it to not show up without you noticing.

3.1.3 List with all sources

To use the list with all sources, you must create a new static page on your website and place one of the following shortcodes on it.

Use the following shortcode to list all images attached to a certain page or post.

[isc_list_all]
Code language: JSON / JSON with Comments (json)

Use the included parameter to display all images from your media library, including those not actively used in posts and pages.

[isc_list_all included="all"]
Code language: JSON / JSON with Comments (json)

Use the attribute per_page to list only a limited number of image sources per page (here: 25).

[isc_list_all per_page="25"]
Code language: JSON / JSON with Comments (json)

You can also combine all attributes into one, e.g.

[isc_list_all per_page="25" included="all"]
Code language: JSON / JSON with Comments (json)

3.2 Other methods

To list a single image source in the frontend / in your template, use this function:

<?php if( function_exists('isc_image_source') ) { isc_image_source($att_id); } ?>
Code language: HTML, XML (xml)

$att_id is the id of the image in the media library.

Use the following function to list the image source of the featured image / thumbnail of a post in your template (single page or archive pages within the loop):

<?php if( function_exists('isc_thumbnail_source') ) { isc_thumbnail_source($post_id); } ?>
Code language: HTML, XML (xml)

$post_id is the id of the post. You can leave this empty when you use the function within the loop.

3.3 Standard source

Instead of handling the source of each image manually, you can define a standard source used for multiple images at the same time. This makes sense when a larger number of your images are from a specific vendor or your own.

Find the Standard source options in the Miscellaneous settings box to define the behavior of these default sources.

You can edit the image sources when uploading the image or through the Media library.

4. Edit image sources

Image block

When uploading or editing the image using the Image block in the block editor you should find the image source fields in the block settings on the right.

Controls for the image sources in the block editor.

Media Library

You can also edit the image source in the media library.

  1. Go to Media > Library
  2. Click on the image thumbnail
  3. Find the fields on the right
Image source fields in the Media Library

Missing Sources page

Go to Media > Image Sources.

Here you find images that don’t have a source yet. Simply click on the image title to go to the image edit page where the image source settings are located.

5. Issues and Debugging

General issues

If sources are not showing on post pages and in the full image source list, it might be due to one of these causes:

  • Your website is cached. ISC cannot create the post-image index for cached page views. You can either wait for your cache updating automatically or clear it to start indexing.
  • Your images are hosted outside of WordPress. ISC only knows about images in the media library.

Missing sources

You can find a list of images with missing image sources under Media > Image Sources.

Warnings about missing image sources.
ISC informs you about potential issues.

Images with empty sources

See a list of images without sources.

Click the image title to reach the edit page for the image.

Images with unknown position

You might see a list of images with unknown positions. This list contains images that ISC did not find in the content of posts or pages. This is not necessarily a problem if the images listed are not intended to show a source, e.g., the logo of your website.

With each visited post and page on your site, the post-image index is updated and this list is getting shorter. Images from your media library that are not hosted within the content might keep showing up in the list.

Check index

You can find further debug options under Media > Missing Sources > Debug.

List post-image relations and list image-post relations load the indices ISC is creating. If you visited a page and the sources are not loaded. If that happens, please see the General issues above.

Reload index

Click on the clear image-post index button to delete the current index. This is helpful if there was a major change of how images or sources were saved on your site.

After clearing the index, ISC will update it with the information of each post or page when it was first visited. You might have to clear your cache if your site uses caching.

Debug mode

Enable the Debug mode under Settings > Image Sources > Miscellaneous settings to see what ISC is doing when visiting a page in the frontend.

Once enabled, visit any page in the frontend and attach ?isc-log to the URL. The plugin now writes any activity into wp-content/plugins/image-source-control-isc/isc.log.

The file is deleted when you disable the debug mode option.

6. Filters and Action hooks

Experienced developers can customize ISC with various filters. Reach out to us if you need more.

Use add_filter() like described on the WordPress Plugin API to add your filter to it.

We recommend you look at the definition of the filters in the source code of ISC to learn how to use them exactly.

isc_images_in_posts

Allows you to register images with a post before the isc_post_images post meta information is saved.

Example:

add_filter( 'isc_images_in_posts', 'your_images_in_posts_filter', 10, 2 ); function your_images_in_posts_filter( $image_ids, $post_id ) { // look at the source code to see how the $image_ids array is structured return $image_ids; }
Code language: PHP (php)

isc_images_in_posts_simple

Same as isc_images_in_posts above but when saving the isc_image_posts meta. Register more posts that use a specific image.

$image_urls = apply_filters('isc_images_in_posts_simple', $image_urls, $post_id);
Code language: PHP (php)