I've been using ckeditor4 for ages in my custom CMS and I've just integrated ckfinder3 so I can use drag & drop image uploading via ckeditor4. Everything is working properly and I have it resizing images upon upload (set in ckfinder/config.php) - all good.
My issue is I want it to create a thumbnail of the image too, as it did in the past (I've been using an earlier version of ckfinder). They used to be uploaded to userfiles/_thumbs/images/ but now it doesn't seem to do it.
I have a few custom bits set up for my editor such as a custom config file and custom contents.css but they shouldn't have any effect on this. My editor code from within my CMS is below, all pretty straightforward stuff and it all works except for the fact that uploading images using drag & drop doesn't create a thumbnail too.
A point to note that if clicking on the 'image' button on the ckeditor toolbar, then uploading the usual way - browse server/upload etc, the system does create a thumbnail and places it in the folder here: userfiles/.ckfinder/cache/thumbs/images/theUploadedImage/theUploadedImage.jpg
Any pointers would be gratefully received. I hope this makes sense!
Thanks
<textarea name="blog_text"></textarea>
<script>
CKEDITOR.replace( 'blog_text', {
customConfig: 'mycustomfolder/myconfig.js',
contentsCss: CKEDITOR.getUrl( 'mycustomfolder/mycontents.css' ),
filebrowserBrowseUrl: 'ckfinder3.4.5/ckfinder.html',
filebrowserImageBrowseUrl: 'ckfinder3.4.5/ckfinder.html?type=Images',
filebrowserUploadUrl: 'ckfinder3.4.5/core/connector/php/connector.php?command=QuickUpload&type=Files',
filebrowserImageUploadUrl: 'ckfinder3.4.5/core/connector/php/connector.php?command=QuickUpload&type=Images'
} );
</script>
The paths and the methods of creating them were chnaged in CKFinder 3. Assuming that you are using default configuration, all thumbnails are being created inside /userfiles/.ckfinder/cache/thumbs/ folder and are on CKFinder private use only. They actually were for private use in CKF 2.x as well but users liked to abuse that.
Thumbnails get also created if you use, available in Popup and CKEditor integrations, "Choose Scaled" option. In that case scaled image gets created inside /MainFilesFolder/resourceTypeFolder/__thumbs/NameOfImage.extension/NameOfImage__widthxheight.extension e.g. /userfiles/images/__thumbs/Students.jpg/Students__480x320.jpg.
You can somewhat change the location of private directory through https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_privateDir but please note that end of path resourceTypeName/theUploadedImage/theUploadedImage.jpg will not change.
There is also a simple plugin available online which allows generating thumbs on file upload. Perhaps this is something that might suit you or something that can be used as a jump start to create your own custom plugin: https://gist.github.com/zaak/7bb61025bfd9d3a6633029b0b4b087f9.
Related
My wordpress site is hosted on the openshift,and when I edit my site's code and push code to openshift,my file that upload to wordpress will be deleted,so I use some public image storage serves to save my image.But there are some function in wordpress must use the media library...So I want to add the image to the media library by url without upload..What should I do?thanks
p.s:I can edit the code of my wordpress site
Try some plugin like this one: https://wordpress.org/plugins/import-external-images/
It's the first i've found, i've never used it before, so look if there's something better.
In order to upload images to my server I need to post to a specific URL so that I can handle it on the back end. TinyMCE seems to provide support for such functionality, but it's not entirely clear or explicit about it.
I tried using JustBoil.Me to upload the image, but the way it's set up does not play nicely with my Laravel and URL setup.
Have any of you had to do this before?
I found this resource to be very helpful, but the lack of literature on this topic is shocking:
Direct Image Uploads in TinyMCE 4 (it would be amazing to see a PHP/Laravel server side code snippet on how to return something that TinyMCE can process)
From two days i am shocking and have surprize, if upload the jpg image in wordpress site via
media then its make my image pixelated. Even image fine. If i upload png image then its working fine. But any jpg upload in correct format but when see in browser then its come pixelated and blur check below link, first time you see this fine but when you refresh then you see its come blurred.
http://www.edarabia.com/wp-content/uploads/2014/11/prince-andrew-visits-british-school-al-khubairat2.jpg
IF you check here then its show fine
http://www.edarabia.com/102810/prince-andrew-visits-british-school-al-khubairat/
Even i done all plugin setting default restore and done many experiment but this problem not solved.
Thanks
General answer to "my Wordpress site has issue":
disable plugins - if problem gone, enable plugins one by and and test again.
check functions.php for extra functionality - try to remove all filters here.
test with some default theme. IF problem solved - issue was on theme.
Well this is the only problem that bugs me a lot every time I create a CMS.
Say I have included the functionality to add some images with text (Not a image gallery) . This is the create function of CRUD. The read and delete are also not very difficult. The only problem I face is with the update function.
How should the image update be handled. How can I know that if the user wants to change the image and later if he submits a new image.
If he checks to change the image and uses the same image to upload, it would be useless to first unlink the previous image and upload the same image again.
How are these kind of things handled?
At this moment I am using codeigniter for Development.
Most CMS's will have image functionality baked in. I'd first suggest not trying to reinvent the wheel here.
In ExpressionEngine for example (on a codeigniter backend) you're givin a 'field tag' <img src="{{channel.img}}" />
The CMS is smart enough on the backend to change that field's value on update without you having to manually do anything. The only issue is if it overwrites the image name/location rather than created a new image in the uploads and leaving the previous one in there.
This is how it's handled in Umbraco CMS as well.
What else do you need?
I inherited a project with drupal and flash, and I'm pretty noobish on the topic so please don't bash me.
What I'm stuck at is that I need to create multiple thumbnails for each uploaded image (5 version to be precise with different settings eg. 150w, 250w,..) I created the presets but I can't seem to understand how imagecache works: it looks like the module builds the thumbnails only after I firs see the images, problem is that after I create the node I'm greeted with this view:
as you may notice some of the fields can have multiple images.
If I'm correct in my assumption that imagecache only builds thumb when you first access the node why I can't see the images but only the icons? Alternatively is it possible to force imagecache to create the different sizes as soon as the images are uploaded?
If not how does imagecache works?
Thanks
Imagecache only creates the thumbnails when they are requested the first time, but that should not result in this problem. Check if in your content type (under "display fields") the filefield containing the images is set to display an imagecache preset, not something like "Generic Files".