Upload and Store listing images at S3 (Simple Storage Service) Bucket on Cloud environment. Most popular S3 service is Amazon AWS, but plugin support any S3 service compatible with AWS PHP SDK v3 (all major providers supports this library).
"Must have" addon for all classified ads websites those wants to grow and scale well as they grow!
Save money on the hosting and reduce its cost
Why S3? Answer is very simple - to save cost. Majority of hosting companies link available storage on hosting plan to other parameters like domains count, database count, mail clients and more services you do not need.
Classifieds software and especially Osclass require just space. And S3 service is savior. If you use S3 service like AWS, Wasabi or DigitaOcean, you are going to pay few dollars more, but at same time you can minimize your hosting plan and save much more!
S3 cost for Classifieds CMS
Let's quickly calculate what cost can you expect if you choose one of S3 providers. Assume you need 100GB of space on monthly base. This is quite high limit and will cover most of classifieds websites. Note that you are only billed for what you use, so cost might be much lower at the end.
1 listing has in average 5-10 images. Osclass will create 3 variants of each image (thumbnail, preview, normal). We do not expect you keep "original" images. We need approximatelly 0.5-2MB to store all image variants for 1 image uploaded, that is approximatelly 5-10MB of space required for 1 listing.
100GB of space is enough to store 10-20 000 of listings. Calculations are approximate.
S3 costs per provider:
- AWS - starts on $2.3 per 100GB monthly + additional costs
- Linode - $5 per 250GB/monthly
- DigitalOcean - $5 per 250GB/monthly
- DreamObjects - $2.5 per 100GB of storage monthly, $5 per 100GB of downloads monthly
- Wasabi - $0.59 per 100GB monthly, minimum $5.99 monthly
- Backblaze B2 - $0.5 per 100GB of storage monthly, $1 per 100GB of downloads monthly
- Scaleway - 75GB free monthly, then $1 per 100GB monthly
Notice costs are extremely low. Anyone can afford to pay i.e. for Wasabi $5.99 monthly and get 1TB of data! 1TB is 100-200k of listings monthly!
You may get S3 completely free using Scaleway. 75GB can easily manage thousands of listings.
S3 Cloud Storage Extension
S3 Storage plugin provide easy and ultimate way to store all listing images on S3 bucket. It comes with 8 pre-configured S3 services, but also allow to define custom S3 provider.
Plugin use powerful AWS PHP SDK v3 library that's preintegrated in most S3 services. It supports PHP 7.x and PHP 8.x, not tested on PHP 5.x.
It is recommended to use plugin on Osclass 8.1.2 or later, but will work without any issues on Osclass 3.3 or higher, if S3 service provides public URL to bucket.
S3 configuration options
Plugin comes with rich configuration and customization options.
- Enable S3 - Quickly enable or disable S3 storage features
- Provider - Select S3 service, 8 providers are pre-configured.
- API Public & API Secret Key - API keys to connect into bucket
- Check S3 connection - Easily check and verify that connection to S3 bucket is functional
- Bucket - enter bucket name where images will be stored. Bucket is like virtual folder or repository.
- Endpoint URL - endpoint of S3 service. Endpoint URL may not be same as bucket URL! Endpoint URL is used to initiate client.
- Public bucket URL - may not be available for all providers. Is link to your bucket accessible without verifications or tokens. If defined, images can be referenced as https://public-bucket-url.com/{image-file-name}
- Region - region identifier/name or code. It identifies which S3 server will be used. It should be closest to your location. Usually is string like us-east-1, eu-central-2 or fr-par.
- API Version - version of endpoit API. Most of services supports "latest" as API version.
- Use path style endpoit - tells S3 service that you want to use bucket url in format storage.endpoint.com/bucket instead of bucket.storage.endpoint.com.
- ACL of uploaded image - access control for uploaded images, usually public-read.
- Storage Class of uploaded image - define how to store your images. Can affect billing. If you want to save money, you will select options like ONEZONE_IA, otherwise you can use STANDARD or REDUCED_REDUNDANCY for better performance.
- Keep local images- specify if you want to keep image files on your own server/hosting. Usually enabled while testing, disabled on production.
- Upload missing images to S3 - attempt to upload images from local to S3, when they are missing on S3 bucket and are available locally. Can help to deliver images to S3 without extensive loading in batch, however cause delay/lag of page load when loading images.
- Image URL type - Available options are Public - images are accessible to anyone, Pre-signed - images are available only with token and just for limitted amount of time, Unsigned - if public URL is not available and you do not want to sign your images. Note that Pre-signed URL type can help "sensitive" sites those are strictly against sharing of their images & resources on 3rd party websites. If Pre-signed URL used and bucket is not public, images are protected and cannot be loaded without token from other domains. That's pros, on the other side these images are not cached and can take few miliseconds more to load them.
- Enable debugging - S3 SDK library will generate logs.
Easy bucket content management
Common problem for production websites is "How to load all images to S3 Bucket?". We have answer and created special functionalities to work with S3 service and buckets.
List available buckets / List bucket images
List all available buckets (names) you've created on S3 service. You can also list bucket objects/images. Only first 1000 objects is usally returned.
Download bucket images
Download your images from S3 bucket to your local hosting/web. As there can be thousands of images, plugin will list all item resources and try to retrieve image by image in batch mode, usually by 500 resources that can be 1500-2000 images.
Batch count can be modified in plugin constants if your server timeout.
WHen first 500 resources is loaded, you can continue in batch or you can decide to reset batch and start from beginning.
Only images those does not exists are downloaded, so no resources & API calls are wasted.
Upload local images to S3 bucket
In very similar way as download works, you can upload all resources from your local hosting to S3 bucket. This is great feature after installation and helps to upload thousands and thousands of images effeciently in batch mode.
Alternative way is to download content of oc-content/uploads/ folders (0, 1, 2, 3, ...) and upload all images directly to bucket manually.
Plugin does not use virtual folders in buckets. All images are located directly in root of bucket!
Compatibility with other optimization plugins
This plugin is compatible & synergize with other plugins focusing on page speed optimization:
Note: Plugin require PHP 7.0 or higher. May not work on PHP 5.6, but not tested and not supported.
Note: Plugin works on Osclass 3.3 or higher, if your S3 provider has Public Bucket URL available and you will not used pre-signed URL type. Otherwise compatible from Osclass 8.1.2 or higher