Social Media Image Kit

Social Media Image Kit

Generating Images

The primary method of generating images is using the generate-images Artisan command:

1php artisan social-media-image-kit:generate-images

This command will generate images for each collection that has been configured. During the process, you should see something similar to the following image in your terminal:

Console window showing image generation progress.

#Regenerating Images

By default Social Media Image Kit will not regenerate images that were previously generated when running the generate-images command. To force a regeneration we can use the --regen flag:

1php artisan social-media-image-kit:generate-images --regen

#Generating Images for a Single Entry

To regenerate images for a single entry using the command line we can pass the ID of the entry as the first argument to the generate-images command:

1php artisan social-media-image-kit:generate-images the-id-here --regen

#Command --collection Option

The generate-images command supports a --collection option that may be useful if you need to run the command from another command or other automation script. When this option is set it will not prompt for any input.

To process images for all collections you may use the * value:

1php artisan social-media-image-kit:generate-images --collection=*

You may also specify a single collection name like so:

1php artisan social-media-image-kit:generate-images --collection=blog

If you'd like to specify multiple collection names, separate them with commas:

1php artisan social-media-image-kit:generate-images --collection=blog,pages

#Generating Images Using a Queue

You may use a queue to generate images automatically whenever a content editor makes changes to an entry within the Control Panel. For more information on how to set this up, please consider checking out the Using a Job Queue article.

Some absolutely amazing

The following amazing people help support this site and my open source projects ♥️
If you're interesting in supporting my work and want to show up on this list, check out my GitHub Sponsors Profile.