The Amazon plugin integrates media data from your Amazon S3 storage into the Joomla core media manager. It allows the admin to select images in articles and any other extension which uses the core media manager. Beside that it is possible to create folders, upload images, rename and delete the data directly from within Joomla on your Amazon S3 storage. It's possible to add unlimited different Amazon accounts and buckets in the plugin.
Custom endpoints, like Digital Ocean Spaces or OVHCloud, are supported as well. The current documentation covers only the AWS dashboard, please consult the documentation of your current endpoint provider how to get the keys, bucket name and current endpoint url information.
Please read the Concept of image service provider integration article to get more information how to get started with the image service provider plugins from DPMedia.
To get access to the Amazon S3 storage you need to create first an access and secret key. They are used to identify you while accessing the API without exposing username and password. Another benefit is that they can be revoked at any time.
Log in on the Amazon AWS console and go to the ("My Security Credentials")[https://console.aws.amazon.com/iam/home?#/security_credentials] site of your account. Then open the Access keys accordion tab and click on "Create New Access Key". A modal will then open where you can copy the access key and access secret to an editor. Keep in mind that this is the only place where you can copy the secret, afterwards it will be not available again and you have to create a new key.
To upload your media to Amazon S3, you must first create an S3 bucket in one of the AWS Regions. You can then upload any number of objects to the bucket. After you are logged in on Amazon AWS you can see your list of buckets (here)[https://s3.console.aws.amazon.com].
Click on "Create bucket" and then you will be forwarded to the bucket form where you can enter the bucket name and region as well as some permissions. The region is needed later when integrating the bucket in the plugin. Permissions define if a file can be accessed by the public or not. If access is blocked, then you need to serve images locally.
Adding an Amazon AWS account is rather straightforward. To do so, open the filesystem Amazon plugin in the plugin manager in the back end of your Joomla site. Click on the green "+" button in the plugin edit form. Copy your access and secret key into the form. You need to define the region where the media data is located of. The region must be a string like "eu-central-1". This means that only buckets are shown which belong to this region. Click the "Save" button in the toolbar of the plugin and your account is added to the plugin.
Per integrated account you can define an optional bucket. If a bucket is set, then as root folders is the contents of the bucket shown, otherwise the buckets of the account and region.
Per imported account the admin can define that media files should be served locally. This helps to ensure that the site is compliant with the sites privacy policy and that the visitors are only fetching media data from the web site.
If activated, then the files are copied from the Amazon S3 storage to the local filesystem on a path the site admin can define. This happens when a media file is selected in an article or everywhere else from a media field. During the media list fetch, the files and thumbs are not stored locally. Each file will be saved with the last modification timestamp to ensure that the updates are immediately reflected locally.
If the file is an image it is also possible to define a custom width and height, so the drive of the Joomla site will not fill up quickly.
Local files are also needed when the permissions of the bucket they belong to blocks public access. Otherwise the media data can't be shown in the folder.
As Amazon S3 doesn't support public links for thumbnails, DPMedia creates them on the fly for the media list, the thumbnails are not used anywhere else. It does it by downloading the original file and creates a thumbnail out of it while fetching the images list. In the options the admin can define per account where the thumbnails should be stored on the local filesystem.
DPMedia is fetching only 10 thumbnails per request, otherwise it it can reach the execution time on large Amazon S3 buckets. So if an image has no local thumbnail a default placeholder will be shown instead.
The plugin supports automatic resize when images are uploaded. The images are only scaled down, but not up. The admin can choose between the following four options when resizing should be applied:
When only a width or height is set, then a resize is performed and the aspect ratio is kept. Like that will all images have the same width or height. When both dimensions are set, then an option is shown which lets you define if the aspect ratio should be kept or not. If it is not kept, then each image has the same dimensions but the smaller side gets cropped. Here are some examples listed for a better understanding:
Image dimensions | Force width | Force Height | Keep aspect ratio | Resized image dimensions | Crop |
---|---|---|---|---|---|
2000 x 3000 | 0 | 400 | 267 x 400 | No | |
2000 x 3000 | 400 | 0 | 400 x 750 | No | |
2000 x 3000 | 400 | 100 | No | 400 x 100 | Height is cropped from 750 to 100 |
2000 x 3000 | 400 | 100 | Yes | 67 x 100 | No |
2000 x 3000 | 100 | 400 | No | 100 x 400 | Width is cropped from 267 to 100 |
2000 x 3000 | 100 | 400 | Yes | 267 x 400 | No |
Per imported account the site administrator can define caching so images will be loaded much faster in the media manager. DPMedia uses the core Joomla cache, so it can be revoked at any time in the core Maintenance Manager. Additionally the admin can define a cache time so images will downloaded after a certain time automatically again from Google Drive.
Comments (0)