How to create thumbnails in a custom bucket
If you've just linked your custom bucket, you may find that you need to create your own thumbnails, and you might not be sure quite how. Luckily, this is a simple process that we'll walk you through!
How to prepare thumbnails in the custom bucket
For starters, the thumbnails in the File Manager are PNG files that are resized to 200x200 px.
Here is an example of thumbnail generation with image magick:
# convert one file
convert image1.jpg -resize 200x200 image1.jpg_thumb.png
# resize many files (WARNING this command overwrite files) mogrify -resize 200x200 myimages/*jpg # convert many files mogrify -format png myimages/*jpg
Let's walk through an example. We'll be using this custom bucket configuration:
- bucket_name :
my-custom-bucket
- path_images :
/path/to/images/
- path_thumbnails :
/path/to/thumbnails/
...And starting the editor with this UID:
- uid :
my-uid
When uploading image1.jpg
in root dir, this key will be created in the custom bucket: s3://my-custom-bucket/path/to/images/my-uid/image1.jpg
. Following that, a thumbnail will be generated with name image1.jpg_thumb.png
with key: s3://my-custom-bucket/path/to/thumbnails/my-uid/image1.jpg_thumb.png
.
And one more example:
When uploading image2.jpg
in mydir
inside the root dir, this key is created in the custom bucket: s3://my-custom-bucket/path/to/images/my-uid/mydir/image2.jpg
. Similarly to above, a thumbnail will be generated with name image2.jpg_thumb.png
with key: s3://my-custom-bucket/path/to/thumbnails/my-uid/mydir/image2.jpg_thumb.png
.
And that's all you need to know for creating your own thumbnails in your custom bucket!
For more information on setting up your own bucket with the Plugin, please see Configure Your AWS S3 Bucket.
Comments
0 comments
Please sign in to leave a comment.