Open meetinghouse opened 9 years ago
@vivek-chaudhari Vivek, do you know how we can add this functionality to the image upload? Something like what WordPress does when you upload an image it resizes it with different sizes for thumbnail, small, medium, actual size. Is there a way to do this, maybe a module we can add? Looking around for ideas. Thanks, -John
@vivek-chaudhari This might be what we need: http://www.phpgang.com/image-upload-and-resize-using-image-intervention-in-laravel_889.html
This looks interesting too: http://www.camroncade.com/dealing-with-image-uploads-laravel/
@jboz62 Yes I can do this. Even I had make use of this image intervention library for cropping purpose in laravel.
@vivek-chaudhari That sounds good, Vivek, but we don’t want to crop, we need to resize. It would be the same image, just at different sizes, like WordPress does.
@vivek-chaudhari Any idea how much time this might take to do?
@jboz62 But this doesn't mean that images put on editor will be resized automatically, we need to think about it how we can resize images which are directly put on content editor. Using given solution images which will be uploaded using upload option can be resized and doing this one will take almost 6-8 hours.
@vivek-chaudhari From what I'm reading in that documentation, is looks like you can set the size and it will resize when you upload the image. Here's the code snippet on that:
`Route::post('/upload', function(){
if (Input::hasFile('avatar'))
{
$file = Input::file('avatar');
$file->move('uploads', $file->getClientOriginalName());
$image = Image::make(sprintf('uploads/%s', $file->getClientOriginalName()))->resize(200, 200)->save();
}
});`
Isn't that possible to do?
@vivek-chaudhari More on that: http://image.intervention.io/api/resize
@jboz62 This is possible but I am talking about images which are we put on wysing content editor when we create a post or a page.
@jboz62 Also what could be possible image size, we need to make single image or multiple images of different sizes of single image?
@vivek-chaudhari Vivek, we added this feature, right? If so, please close issue. Thank you.
@vivek-chaudhari Vivek, just updating this issue so we can get this done:
Notes from John C.:
Vivek, John wants you to check to see what the limit is set to for the image uploads on the Projects. It should be at least 8MB, I think, but then should resize the image to max 850px.
Vivek, please check the functionality on that, seems to not work at all.
Let me know if you have questions.
Thanks, John
Andy, (I note this was addresssed #2, I'll leave and we'll discuss.)
I notice that the program is saving and loading all images full size. My understanding is that this is what causes the pages to load slow. Bones saves the pages display size, so the load time is faster.
Example is http://preservationarts.corbettresearchgroup.com/american_legion_post_48_hollywood, the very first image thumbnail (screenshot thumbnail.)displays an estimated 225 x 150, but if you download that image, it is 1500 x 1140.
Equivalent page, in Bones, http://www.preservationarts.net/index.php/american_legion_post_48_hollywood.html, thumbnail (screenshot bones.)
displays the same (roughly) but is actual size when downloaded, 300 x 228.