4

I am using CKeditor, and I need to add media in content. I have enabled the media in the CKeditor configuration.

Change ckeditor configuration

Then I upload an image:

upload impages

select image style

The image is being added:

Image added

Checking the path for the image :

Html format

It gets saved in the local server, while I want it to be saved in a CDN.

I am also using the Media module and CDN old S3 module. which saves all the media in the CDN, but the images for CKeditor are saved on the local server.

Currently, it is saved in the base path (eg. https://drupal.stackexchange.com/). I want it to be saved and retrieved from my CDN.

I did find the Uploadcare : Add media from anywhere plugin, but I don't understand how to use it; I think it has its own CDN, but I want it to use my own CDN.

Modifying the core is not recommended and it is not the best practice, how do I achieve it in efficient way. How do I save images added from CKeditor on a CDN instead of the local server?

  • Wich version of CKEditor? Have you try looking in CKEditor forum? It seem more related to CKEditor than Drupal. – FR6 Mar 4 '14 at 22:52
  • check here ... ckeditor.com/forums/Support/… – Hitesh Mar 5 '14 at 7:01
  • @FR6 : do you any solution for this ... any work around for to bring this functionality – Hitesh Mar 5 '14 at 7:02
1

Until CKEditor developers implement the functionality, you could create a custom module that:

  • on node add/edit you loop thru all fields using CKEditor and crawl each images/videos
  • detect if the images are already on the CDN
  • if not, upload the images/videos on the CDN
  • replace the images links with your new CDN links
  • save the node

I hope it will help you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.