How Plugin Works with Images

Before we continue, let me clarify how both of my crossposting plugins actually process the images (or any other files).

How it works

Type of attachmentHow it is processed by the plugin
Featured ImagesWill be copied to sub-sites with their data (just once). If an image with the same filename exists, it will be used instead.
Images in post contentAs long as the post content only holds image URLs, the plugin does nothing with them. So, there is no need to duplicate every post image from the article (there could be hundreds of them) as long as we can use their original URLs. We also win in performance.

But the not-multisite version of the plugin has an option in settings to copy the content images to subsites (ACF blocks aren’t working with this feature, for ACF blocks please use add-on below).
Images or any files in custom fields (added with ACF or any other plugin) or images in ACF blocksUsually attachments stored in custom fields as their IDs. By default plugin does nothing with them, but you can use my free add-on for that purpose (described below)

Images (and any files) in custom fields

Let’s assume you created an Image (or File or Gallery as well) field using for example Advanced Custom Fields plugin or any other plugin for creating custom fields.

Download Simple Multisite Crossposting – Attachments in Custom Fields 2.0
Download Simple WordPress Crossposting – Attachments in Custom Fields 1.0

If you’re using ACF plugin, there is nothing else to do – add-on automatically recognises the fields of Image, Gallery or File types. In case you’re using any other plugin or a custom meta box, please add meta keys of a custom attachment fields into a hook:

add_filter( 'rudr_crosspost_attachment_meta_keys', function( $meta_keys ) {
	$meta_keys[] = 'my_image_field';
	$meta_keys[] = 'post_bg_image_blah_blah';
	// ... etc
	return $meta_keys;
} );

If the fields, mentioned in the hook, store an attachment ID or an array of IDs, they are going to be processed:

  1. Attachment (or attachments) are going to be copied to sub-sites if necessary.
  2. The meta values will be replaced with the appropriate attachment IDs on sub-sites.

Need more help?