DMO Spacer Gif Generator.
A simple WordPress Plugin.

Generate spacer gifs easily

Whether building a masonry grid, using lazyloading or trying to increase pagespeed, sometimes it makes sense to use a gif as a spacer. The DMO Spacer Gif Generator generates automatically a monochrome (white) gif from ervery uploaded image and every media size. Also you can generate manually pending spacer gifs or regenerate the hole medialibrary.


  1. Requires at least: Wordpress 4.7.1
  2. Tested up to: Wordpress 4.9.6
  3. Requires at least PHP: 5.6
  4. Tested up to PHP: 7.2.1


  1. Install either via the WordPress.org plugin directory, or by uploading the files to your server.
  2. Activate the plugin through the 'Plugins' menu in WordPress.


  1. Once you have installed and activated the plugin, it will automatically generate the requested spacer gifs.
  2. Use the dmo_sgg_get_spacer_img() function to get the url of an specific spacer gif.

dmo_get_spacer_img(IMAGE_ID, SIZE);


(int) The wordpress attachment id

(string) Media size, for example 'thumbnail', 'medium' or 'large'.


(string) The url to the requested spacer gif.


Get a specific spacer gif by ID:

echo '<img src="' . dmo_sgg_get_spacer_img(39, 'thumbnail') . '" />';

Get the spacer gif of the featured image:

// Get the current post featured image by post id
$post_thumbnail_id = get_post_thumbnail_id($post->ID);
// Get the spacer gif
$dmo_sgg_spacer_image_url =  dmo_sgg_get_spacer_img($post_thumbnail_id, 'thumbnail')
// Output an image
echo '<img src="' . dmo_sgg_get_spacer_img(39, 'thumbnail') . '" />';


Please go to: https://wordpress.org/support/plugin/dmo-spacer-gif-generator