BunnyCDN+BunnyAPI

Description

Use the BunnyAPI plugin to upload files to the BunnyCDN file storage zone and save space on your website and speed up all images.

Details

BunnyAPI (https://bunnyapi.com) by NoteToServices (https://notetoservices.com) is a collaboration project with BunnyCDN (https://bunnycdn.com) to extend the functionality of the BunnyCDN plugin (https://wordpress.org/plugins/bunnycdn/) to WordPress, which serves as a file storage content-delivery network service.

BunnyCDN+BunnyAPI allows you to upload to BunnyCDN directly from your website and view or link to your images.

This plugin requires registration of an account at BunnyCDN.com and registering your API key at BunnyAPI.com.

Technical Details

BunnyCDN is a CDN service that stores and delivers files at hyper speeds for an amazing price.

BunnyAPI (https://bunnyapi.com) is a service that connects to BunnyCDN (https://bunnycdn.com).

BunnyAPI handles only the API communications between BunnyCDN and third-party web applications, including WordPress (BunnyCDN+BunnyAPI plugin).

The BunnyCDN+BunnyAPI plugin adds functionality for uploading images to BunnyCDN and serving them directly from your BunnyCDN storage zone with the default hostname or hostname of your choice. The link structure is changed to point to the file on BunnyCDN.

The BunnyCDN+BunnyAPI plugin uses WordPress API and BunnyCDN API.

Video Tutorials

  1. https://bincdn.com/?4sjrcp5r1nf
  2. https://bincdn.com/?mtmngt9r6p6
  3. https://bincdn.com/?7n3r3pmnhsh
  4. https://bincdn.com/?dshnbs8pmnl

Known Issues

  • Uploading more than 20 files at a time directly through BunnyAPI may fail depending on what your server allows -workaround: upload to media library and then force push the media library to BunnyCDN Media

  • Using the Push WP Media Library button, the transfer of a media library that contains hundreds to thousands of images may cause a server timeout trying to upload all the files to BunnyCDN resulting in files that may or may not be uploaded

  • Using the Copy BunnyCDN Media button, the transfer of one folder to another that contains hundreds to thousands of images may cause a server timeout

Additional Info

  • If your server is preventing you from uploading more than 20 files at a time via BunnyCDN Media, you can upload to the Media Library, and then use Push WP Media Library to BunnyCDN Media.

  • You may also upload all of your files directly through BunnyCDN inside of the Zone directory that you have linked up with your BunnyAPI Key. Create a folder such as ‘uploads’ and save the folder name inside of the BunnyAPI Settings. All media files within that folder will automatically display.

  • If you wish to rename your directory, “uploads” to “my_uploads”. Save “my_uploads” as your BunnyCDN folder. You can then click Copy BunnyCDN Media. Enter in “uploads”. Anything within the uploads folder will be copied into the “my_uploads” directory.

  • You may only point to one directory at a time, but if you have multiple directories within your storage zone, you can save the BunnyCDN folder, and anything within that folder will be shown in the BunnyCDN Media library.

  • You can use the feature, Delete All BunnyCDN Media, to delete everything within any of these directories.

  • Through BunnyCDN Media, you can select a raw URL or a [img] shortcode.

  • The [img] shortcode has multiple built-in features including image src, alignment, title, alt, link, and target. src is the only requirement.

  • The [img] shortcode does not require a closing tag.

  • The [img] shortcode may include quotes if you prefer, but quotes are not required.

[img] shortcode usage:

[img src=https://bunnyapi.com/bunnyapi-logo.jpg href=https://bunnyapi.com/bunnyapi-logo.jpg link=yes|no align=left|center|right alt=”Bunny API Logo” title=”BunnyAPI website” target=_blank|_self|_top|_parent display=inline|block|contents|flex|grid|inline-block|inline-flex|inline-grid|inline-table|list-item|run-in|table|none|initial|inherit data-src=none|https://bunnyapi.com/bunnyapi-logo.jpg]

[img] shortcode details:
src = url of image [required]
href = link to image or another url
link = link directly to image or not
align = position of image
alt = alternative text for image
title = used for a title in the link
target = how you wish to open the link of the image
display = how you want your image to be displayed
data-src = data-src used for Javascript purposes, leave blank to capture the default src or none to remove data-src

Copyright Info

Copyright (C) 2015-2020 NoteToServices

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Terms

By using this plugin and enabling BunnyAPI, you agree that your website will need to make external calls to BunnyAPI.com and BunnyCDN.com.

If you do not agree to these terms, please uninstall and delete this plugin.

If you find this plugin useful, please give a review.

BunnyCDN’s Terms of Service: https://bunnycdn.com/tos
BunnyAPI’s Terms of Service: https://bunnyapi.com/?terms

BunnyAPI is a third-party service of BunnyCDN and was developed by NoteToServices under permission of BunnyCDN.

If you have any issues with the BunnyAPI plugin, please use the BunnyAPI support forums on WordPress, not the BunnyCDN forums.

BunnyCDN is a product of BunnyWay.

You may not redistribute this plugin or alter the name in any way without permission from NoteToServices or BunnyWay.

Screenshots

  • BunnyAPI Dashboard Settings
  • BunnyAPI is located under Tools when BunnyCDN is not installed
  • BunnyAPI is located under BunnyCDN when the plugin is also installed
  • Registering your BunnyCDN account on BunnyAPI.com
  • BunnyCDN FTP & API Access Password
  • BunnyAPI Key
  • BunnyCDN Hostname
  • BunnyCDN CNAME
  • BunnyCDN Linked Hostname
  • BunnyCDN Media
  • BunnyCDN Media button located on Posts and Pages
  • BunnyCDN Media with Bandwidth Savings

Installation

  1. Install and activate the BunnyCDN+BunnyAPI plugin.
  2. Navigate to BunnyAPI.com, enter in the required BunnyCDN information, and grab your BunnyAPI key.
  3. If you do not have the BunnyCDN plugin installed, locate the settings page under ‘Tools’ and enter your BunnyAPI key. If you do have the BunnyCDN plugin installed, it will be located under BunnyCDN.
  4. Upload files through the BunnyCDN Media located under Media to your BunnyCDN storage zone.
  5. Display images with your BunnyCDN link.

FAQ

Q: What does BunnyCDN+BunnyAPI do?
A: BunnyAPI extends the functionality of BunnyCDN to upload files to your storage zone and serve them directly from your website via BunnyCDN.

Q: Can I use BunnyAPI without a plan?
A: You will need to create an account, a pullzone, and a storage zone at BunnyCDN.com and then you will need sign up for an API key at BunnyAPI.com in order to use BunnyAPI and BunnyCDN together.

Q: Is BunnyAPI free?
A: BunnyAPI.com requires registration of your API key which you will need to obtain at BunnyCDN.com. BunnyAPI.com is a separate third-party entity with its own pricing rates apart from BunnyCDN.com. Both services are not free and have separate pricing plans.

Q: Can I change the default BunnyCDN link to a custom domain?
A: Absolutely. To do this, you must add your CNAME host and records at BunnyCDN.com. You should ensure you can view or access your files at this domain location. (example: www.bunnyapi.com/bunnyapi-logo.jpg) Next, you will update the hostname on the Settings page. If no hostname is set, BunnyAPI will use your default BunnyCDN hostname.

Q: How much storage space do I have?
A: BunnyCDN.com provides you with an unlimited amount of storage space and charges based on a pay-as-you-go system, offering very affordable pricing, but you can set limitations within the Zone settings.

Q: Will my original files be deleted after they are uploaded?
A: Since you are not uploading directly to the Media Library, no files will ever be stored on your server longer than they need to be.

Q: Will BunnyAPI delete files from BunnyCDN if I delete them on WordPress?
A: Deleting files from your BunnyCDN Media on WordPress will delete them from your BunnyCDN storage zone.

Q: Will my files be deleted if I delete them from BunnyCDN?
A: If you delete your files directly from BunnyCDN.com, they will no longer show up in the BunnyCDN Media library on your website.

Q: Can I change the upload folder?
A: You may change the folder to anything you want.
Note: Changing it will not automatically move any files from the old folder to the new folder. You may copy all files within the old folder to the new one on the Settings screen by clicking “Copy BunnyCDN Media” and specifying the old folder that you want to copy.

Another thing to note is that you cannot have a blank folder, as BunnyAPI does not support root uploading through the plugin.

Q: Can I upload the WordPress Media Library?
A: Absolutely! From the BunnyAPI settings screen, click on “Push WP Media Library” and let BunnyAPI go to work. Depending on the size of your library, it could take a while.

Q: Can I add a date to the folder structure?
A: This is not currently possible.

Q: I have multiple subfolders but they aren’t showing.
A: BunnyAPI does not currently read recursively into directories.

Q: Can I set a pre-existing folder that already has files in it on BunnyCDN?
A: Absolutely. Just set the folder and BunnyAPI will load anything within the root of that folder.

Q: Will BunnyAPI work with Gutenberg?
A: BunnyAPI will work with Gutenberg, but not directly. In other words, you will simply insert a new block, add media, and insert from URL. Or you can paste the img shortcode into the post or page directly.

Q: How do I make my images faster?
A: BunnyCDN is a CDN that provides speedy images through servers worldwide, but if you want to speed up your images even further, we highly recommend that in your Pull Zone settings, under Caching, change your Cache Expiration Time and Browser Cache Expiration Time time to Override: 1 year.

Q: Does my website need to be secure?
A: It is highly recommended that you use a secure website and force SSL on your storage zone. Trying to display secure images from an unsecure website or vice versa may result in odd browser behavior from the browser. However, having a non-secure website will still display images.

Q: My images are not showing up for my custom domain.
A: You should have covered at least two steps in order to link to your custom domain.
1) You will need to go to your Pull Zone settings in BunnyCDN and link a hostname.
2) Once you have linked the hostname, navigate to your domain registrar or host and add the CNAME Record. (Type: CNAME Name: cdn Value: *.b-cdn.net * = BunnyCDN Pullzone Name (or hostname))

Changes may take up to 10 minutes or more to go in effect.

For more information: https://support.bunnycdn.com/hc/en-us/articles/207790279-How-to-set-up-a-custom-CDN-hostname

Q: My images are not appearing in BunnyCDN Media.
A: Ensure that your hostname is properly set, the proper folder is set, there are actually files within the folder, or try clearing the BunnyCDN cache.

Q: Does BunnyAPI alter my images?
A: Unlike WordPress which may scale down large images, BunnyAPI does not alter your images in any way.

Q: Why does it take long to upload or delete files?
A: It depends on your server connection to BunnyAPI, but it may take several minutes to upload or delete multiple files. It is advisable not to upload more than 20 files at a time.

Q: Does BunnyAPI use any tracking?
We record every API call to ensure quality and debugging purposes in case something goes wrong, including the BunnyAPI key, the action, the URL submitted, and the IP address of the server that the request came from.

BunnyAPI does not track any additional information about your website or visitors.

Q: Can you explain what everything is on the Settings page?
A: Absolutely.

BunnyAPI key is the API key you will need to get from BunnyAPI.com which allows the plugin to work. This key creates a connection between BunnyAPI, BunnyCDN, and your website.

BunnyCDN Hostname is the hostname you linked in the Pullzone settings under Linked Hostnames and your DNS CNAME. By default, it will look something like .b-cdn.net ( = pullzone name or assigned hostname).

BunnyCDN Folder is the folder on BunnyCDN where your files will be uploaded.

Save Bandwidth will toggle whether thumbnail images are loaded in BunnyCDN Media or instead only clickable links are served thus saving bandwidth.

Update BunnyAPI Settings updates the settings on the current page.

Clear Cache will send a request to BunnyCDN to clear the cache of the folder.

BunnyCDN Media Download Link provides you with a link to download a zip file of your BunnyCDN Media.

Push Media Library will upload everything from the WordPress Media library to BunnyCDN Media.

Copy Bunny Media will copy an old folder on BunnyCDN to the current BunnyCDN Folder.

Delete All Bunny Media will delete everything within the current BunnyCDN Folder.

Q: Do I need to install the BunnyCDN plugin?
A: The BunnyCDN+BunnyAPI plugin is independent of the BunnyCDN plugin, but both plugins do compliment each other.

Q: Are you BunnyCDN?
A: We are a third-party company known as NoteToServices (https://notetoservices.com) and developed this plugin in collaboration with BunnyCDN.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“BunnyCDN+BunnyAPI” is open source software. The following people have contributed to this plugin.

Contributors

Translate “BunnyCDN+BunnyAPI” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.0.0

Basic functionality to connect WordPress and BunnyCDN via BunnyAPI.