meetinghouse / cms

Laravel CMS
0 stars 3 forks source link

Save images display size, Light/Dark themes. #136

Open meetinghouse opened 9 years ago

meetinghouse commented 9 years ago

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.) bones thumbnail

displays the same (roughly) but is actual size when downloaded, 300 x 228. thumbnail am1

jboz62 commented 7 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

jboz62 commented 7 years ago

@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/

vivek-chaudhari commented 7 years ago

@jboz62 Yes I can do this. Even I had make use of this image intervention library for cropping purpose in laravel.

jboz62 commented 7 years ago

@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.

jboz62 commented 7 years ago

@vivek-chaudhari Any idea how much time this might take to do?

vivek-chaudhari commented 7 years ago

@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.

jboz62 commented 7 years ago

@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?

jboz62 commented 7 years ago

@vivek-chaudhari More on that: http://image.intervention.io/api/resize

vivek-chaudhari commented 7 years ago

@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.

vivek-chaudhari commented 7 years ago

@jboz62 Also what could be possible image size, we need to make single image or multiple images of different sizes of single image?

jboz62 commented 7 years ago

@vivek-chaudhari Vivek, we added this feature, right? If so, please close issue. Thank you.

jboz62 commented 6 years ago

@vivek-chaudhari Vivek, just updating this issue so we can get this done:

Notes from John C.:

  1. Project image uploads light theme (Shannon Tucker, tradbuild.corbettresearchgroup.com), it seemed that the size of the images permitted were low so that Ruby and Shannon Tucker had to cut them down in order to upload them. An upper limit is reasonable and necessary, but the one set seems to be set very low. Do you have any idea what the limit seemed to be? How small did an image seem to have to be in order to get uploaded?

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.

  1. Blog light theme image uploader seems not to work at all, judging from the very few blogs we have on the light theme, such as klitsas.com. I seem to remember you commenting on this.

Vivek, please check the functionality on that, seems to not work at all.

  1. Blog image formatting, light theme, dark theme, we want to enable uploading of any size image (max 850w), left justified. If the original is smaller than 850px it should upload at that size, if larger it should be resize down to 850.

Let me know if you have questions.

Thanks, John