I am doing sort of a blog where i use ckeditor to edit the content. I want to upload a lot of images on each blog-post. Right now i'm saving the images as base64 string inside the content and then i just save the content of the blog-post in the database. This makes it suuuper slow. I realize this is far from the best way to do it but i just can't figure out how to save the images and open as i open the blog-post.
Please push me in the right direction!
I'm using azure and a virtual machine is pretty expensive. If the best alternative is to use a virtual machine and add the images to the virtual machine and then get them from there every time i open the post then i'll buy that. But i would rather use a solution where i don't need a virtual machine.
There's no secret and in fact embedding the images as base64 is more complex than the standard solution of uploading the files to a server (I don't care which kind of server you want to use) and link them in the post
Related
I am receiving control of a website and I need to take care of an image compression process.
Right now, when uploading an image, it gets stored on the server with high quality and when the website's being cached, the image is getting compressed for the cache. So the cache has a compressed copy of the image while the original, high quality image, is still stored on the server.
The tool which is responsible of doing what I have just described was developed by the current owner of the website and since I am not getting that tool I will need another one. The site is currently using Pydio and I have not seen any compression option there.
Since it seems I need a new tool for the image compression process, I want to know first what is the best practice, performance-wise, for handling the compression and I know there some good, experienced developers here.
I thought about some options:
Keep it the way it is now, which is to store the original image on the server and when caching, compress it for the cache (Best compatibility with the website since this is what the tool currently being used doing).
Compress all images the moment they are being uploaded and so I will have only the compressed images on the server and use them to cache (Save storage space, but don't know how to combine it with Pydio).
Have a cron which will compress all the images which are not already compressed (Gives me the ability to upload images freely without worrying about compressing them, though the images will not be immediately compressed).
Upload the image to a website which compresses the image and then take the outputted image and upload it (Really, sounds stupid and a lot of messing around in order to upload an image)..
What do you think will be the best practice, and why? Also, Is there a better practice for compressing the images?
Plus, if you know any tool which has an API for it or anything, I will be thankful to hear about it.
The website is built using PHP.
Since the question you're asking is a general-approach one, I will put my two-cents in.
On your approaches:
Option 4 - You could use some offline software or an external site for compression, but it seems tedious work. If I needed to upload one image per day, I would probably choose this option.
Option 2 - I would rather not do compression on upload since you lose the original image. Image compression can ruin some images very badly.
As for options 1&3 - I think it depends on the resources of your server, the number of images, the traffic of your site, etc. Generally, I prefer compressing/caching on request, not upload, but for a smaller site, it shouldn't make much difference.
As for the API - generally, you have two options: do the work on your server/site or use an external service.
When it comes to services, we use CloudImage, it has very simple API and it helps a lot with the compression process (and resizing if you need it). Also, you have the benefits of the CDN, which will boost the performance. Since you are using Pydio, I assume you need data security and privacy, so CloudImage may be a good option for you since they take the privacy stuff really seriously.
If you prefer to do this yourself, and given that you use PHP, I would recommend ImageMagick and the PHP library IMagick. You can control every parameter of the compression and the documentation is pretty good. The only downside is that to achieve best compression without losing quality, it is a bit of trial-and-error at first.
Good luck!
Send your image on Whatsapp to other, received Image will be compressed to the significance size
We have images stored in a file system in the following format. So that web applications can have access to those images with url (http://imageserver.domain.com/items/it1/small.jpg) through an http server.
Now, to allow graphics team to have access to those images for
adding/updating, I was thinking to setup an SVN rep for the folder
“items”. Is this considered a best practice? Any suggestions?
Its certainly doable, however I'd advise that you have 2 folders: one containing a "working set" of images to be used by your web app, and another to be accessed by your graphics team whenever necessary. That way, your team can have a stock of images to work with, while avoiding any possibilities of broken image links or other problems inside your web app.
Better to play it safe IMO.
Hope this helps!
I've always heard that it's considered 'good practice' to have only text under source control. With that said, I've seen companies certainly put images in their repository. Others have created round-abouts like having a virtual directory in IIS point to a shared file server. I prefer the latter since it doesn't take so long to bring down branches. On the reverse side, it provides no historical data that SC would--if needed, of course.
I was thinking to setup an SVN rep for the folder “items”. Is this considered a best practice?
It's an acceptable practice. The images are small and not all that likely to change.
Any suggestions?
Write a cheat sheet for your graphic artists so that they can check out and commit images without problems. The cheat sheets would be specific to the graphic tools they use and their access to Subversion.
I am looking for free web image management system/script/...
I was using and still use photobucket service, but my account is free and has limited space and bandwidth. Now I am approaching the limits. On another side I have web hosting account and want to use it for image hosting instead or in addition to my photobucket. Sounds good. I can use ftp to upload my images and I am fine with it. What I miss is photobucket's web interface to my images. I am talking about photo galleries or portfolio like or something. But basic list of thumbnails, so I can see my images and easy get link to specific image in different formats to past into forum posts or into other web pages referring to that specific picture. Besides, I need easy way to organize pictures in albums/subalbums (like in file system). I see gazillion of image gallery systems, but have hard time to find for what I need. Oh, and I do not want database, just flatfiles/directories.
Anything come to mind?
There's Coppermine Gallery.
I was just looking for something similar.
I know Coppermine pretty well (I run a site powered by it): it is very flexible, with tons of options, and relatively easy to mod to your needs if you know a bit of php. It also reads and displays EXIF data if you configure it to do so. There is a lively community of developers for Coppermine. There is also a plugin that displays BBcode (http://forum.coppermine-gallery.net/index.php/topic,74043.msg356623.html#msg356623), unfortunately only image by image (not in bulk like the ImageShack Uploader). The drawback is that Coppermine is a pretty bulky script and does not perform super fast, especially on slow servers.
Bravenet seems to be a service more than a script.
I'm also checking out Lightbox 2 (http://lokeshdhakar.com/projects/lightbox2/#example) which seems nice and tiny, but not a chance of getting the EXIF file into the displayed image or getting the BBcode.
Will keep an eye on this thread
Is there s a way for anti theft images? I'm not referring to web sites, what I want is if a JPEG is stolen it cannot be manipulated by the thief, only can be used by the owner.
This is not possible as jpeg doesn't have a mean to employ digital rights management. You could protect the file itself, but once somebody else has that file, he can do with it as he likes.
If you host an image on a website then you're stuck with the possibility that someone can download and save it, duplicate it and distribute it.
Some sites use watermarks to mark sample images and then know who they sell the full size images to. This might allow them some legal recourse if the image starts getting distributed.
In practice though this is almost impossible to protect against.
Hope that helps!
Even if you could come up with a protection scheme on the file itself, if the user can display it they only have to hit print screen to get a copy of the file they can work with. Unless you control the computer used to view the file completely it's not possible.
There's not really any good ways of preventing "theft" or free redistribution of content which you post freely on an accessible web-server.
I am looking for a component that resizes and ftp's images to a website.
It doesn't have to be free.
In fact, I prefer something we pay for that comes with solid support.
It has to be able to transfer multiple images at once too.
We work in an ASP.NET MVC environment but the component could be in Flash or Java.
I've used Aurigma Image Uploader successfully in the past. However it doesn't support ftp'ing the uploaded files out of the box, but this could be easily done from the web server end ...
I've used imagemagick and netpbm. Both do excellent job of image manipulation. Since you didn't mention any language, I assume that you will use some kind of script to do both conversion and transfer. I would get everything resized first, and then ftp'ing (or scp, which is simpler to script)
Most are standalone vs. components, but might find something that fits the needs:
http://www.freedownloadscenter.com/Best/ftp-resize.html