Re: [mezzanine-users] How to resize image on upload ?

2018-12-02 Thread Nicolas Pinault

Le 26/11/2018 à 01:40, Stephen McDonald a écrit :



On Mon, Nov 26, 2018 at 3:27 AM Nicolas Pinault <3...@drpi.fr 
> wrote:


Le 24/11/2018 à 23:47, Danny a écrit :

On 25/11/2018 3:43 am, Nicolas Pinault wrote:



Hi,

Le 14/10/2018 à 02:33, Danny a écrit :

On 13/10/2018 11:41 PM, 3...@drpi.fr  wrote:

Hi,

When uploading images in blog post or in media library, I get
an error saying the file size is too big.
I don't want to modify the file size limit, my images come
from a DSLR generating big files.
What I'd like, this is to be able to resize uploaded images
automatically.
I this possible ?


How would this work? In order for the server to do the
resizing (which I guess is what you want, as that's where
Pillow is installed), you'd have to upload the full file, and
then allow the server to resize it - in which case, you're
uploading the large file anyway, so you'd have to remove the
file size limit to allow grapelli to upload that size file.

If you want to resize the file locally before uploading - why
would this be a feature of Mezzanine, which is server-based?
Can't you just resize the pictures yourself using any photo
app on your local computer/device, and then do the upload?

There are 3 ways of doing the resize :
1) Server side. I have to authorize bigger files to be
uploaded. Then, how do I resize the image ?


It looks like this is the best option.
So, how do I resize the image when it is uploaded ? 


Use Pillow to do the resizing
(https://pillow.readthedocs.io/en/5.3.x/ )  but I'm not sure
where in the Mezzanine code to put this - possibly as part of a
filebrowser or grapelli fork?


Sure, Pillow is the way to go.
But where do I put the resize code ?


Mezzanine generally doesn't resize images on upload, instead opting to 
resize images server-side when they're first requested. The code for 
doing this resides in the template where the image is displayed, see: 
http://mezzanine.jupo.org/docs/utilities.html#thumbnail

Thanks for the explanation.





-- 
You received this message because you are subscribed to the

Google Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to mezzanine-users+unsubscr...@googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google

Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to mezzanine-users+unsubscr...@googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.



--
Stephen McDonald
http://jupo.org
--
You received this message because you are subscribed to the Google 
Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to mezzanine-users+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Mezzanine 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] How to resize image on upload ?

2018-12-02 Thread Nicolas Pinault

Le 26/11/2018 à 01:53, John Barham a écrit :
For client side image resizing I use Uploadcare 
(https://uploadcare.com/). There are a number of similar services 
(e.g., https://alternativeto.net/software/uploadcare/).

This is not what I'm looking for but it's interresting.
Thanks


Cheers, John

On Sun, Oct 14, 2018 at 7:57 AM <3...@drpi.fr > wrote:

Hi,

When uploading images in blog post or in media library, I get an
error saying the file size is too big.
I don't want to modify the file size limit, my images come from a
DSLR generating big files.
What I'd like, this is to be able to resize uploaded images
automatically.
I this possible ?

Regards,
Nicolas
-- 
You received this message because you are subscribed to the Google

Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to mezzanine-users+unsubscr...@googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google 
Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to mezzanine-users+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Mezzanine 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] How to resize image on upload ?

2018-11-25 Thread John Barham
For client side image resizing I use Uploadcare (https://uploadcare.com/).
There are a number of similar services (e.g.,
https://alternativeto.net/software/uploadcare/).

Cheers, John

On Sun, Oct 14, 2018 at 7:57 AM <3...@drpi.fr> wrote:

> Hi,
>
> When uploading images in blog post or in media library, I get an error
> saying the file size is too big.
> I don't want to modify the file size limit, my images come from a DSLR
> generating big files.
> What I'd like, this is to be able to resize uploaded images automatically.
> I this possible ?
>
> Regards,
> Nicolas
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] How to resize image on upload ?

2018-11-25 Thread Stephen McDonald
On Mon, Nov 26, 2018 at 3:27 AM Nicolas Pinault <3...@drpi.fr> wrote:

> Le 24/11/2018 à 23:47, Danny a écrit :
>
> On 25/11/2018 3:43 am, Nicolas Pinault wrote:
>
>
> Hi,
>
> Le 14/10/2018 à 02:33, Danny a écrit :
>
> On 13/10/2018 11:41 PM, 3...@drpi.fr wrote:
>
> Hi,
>
> When uploading images in blog post or in media library, I get an error
> saying the file size is too big.
> I don't want to modify the file size limit, my images come from a DSLR
> generating big files.
> What I'd like, this is to be able to resize uploaded images automatically.
> I this possible ?
>
>
> How would this work? In order for the server to do the resizing (which I
> guess is what you want, as that's where Pillow is installed), you'd have to
> upload the full file, and then allow the server to resize it - in which
> case, you're uploading the large file anyway, so you'd have to remove the
> file size limit to allow grapelli to upload that size file.
>
> If you want to resize the file locally before uploading - why would this
> be a feature of Mezzanine, which is server-based? Can't you just resize the
> pictures yourself using any photo app on your local computer/device, and
> then do the upload?
>
> There are 3 ways of doing the resize :
> 1) Server side. I have to authorize bigger files to be uploaded. Then, how
> do I resize the image ?
>
>
> It looks like this is the best option.
> So, how do I resize the image when it is uploaded ?
>
> Use Pillow to do the resizing (https://pillow.readthedocs.io/en/5.3.x/ )
> but I'm not sure where in the Mezzanine code to put this - possibly as part
> of a filebrowser or grapelli fork?
>
> Sure, Pillow is the way to go.
> But where do I put the resize code ?
>

Mezzanine generally doesn't resize images on upload, instead opting to
resize images server-side when they're first requested. The code for doing
this resides in the template where the image is displayed, see:
http://mezzanine.jupo.org/docs/utilities.html#thumbnail


>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Stephen McDonald
http://jupo.org

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] How to resize image on upload ?

2018-11-25 Thread Nicolas Pinault

Le 24/11/2018 à 23:47, Danny a écrit :

On 25/11/2018 3:43 am, Nicolas Pinault wrote:



Hi,

Le 14/10/2018 à 02:33, Danny a écrit :

On 13/10/2018 11:41 PM, 3...@drpi.fr wrote:

Hi,

When uploading images in blog post or in media library, I get an 
error saying the file size is too big.
I don't want to modify the file size limit, my images come from a 
DSLR generating big files.
What I'd like, this is to be able to resize uploaded images 
automatically.

I this possible ?


How would this work? In order for the server to do the resizing 
(which I guess is what you want, as that's where Pillow is 
installed), you'd have to upload the full file, and then allow the 
server to resize it - in which case, you're uploading the large 
file anyway, so you'd have to remove the file size limit to allow 
grapelli to upload that size file.


If you want to resize the file locally before uploading - why would 
this be a feature of Mezzanine, which is server-based? Can't you 
just resize the pictures yourself using any photo app on your local 
computer/device, and then do the upload?

There are 3 ways of doing the resize :
1) Server side. I have to authorize bigger files to be uploaded. 
Then, how do I resize the image ?


It looks like this is the best option.
So, how do I resize the image when it is uploaded ? 


Use Pillow to do the resizing (https://pillow.readthedocs.io/en/5.3.x/ 
)  but I'm not sure where in the Mezzanine code to put this - possibly 
as part of a filebrowser or grapelli fork?



Sure, Pillow is the way to go.
But where do I put the resize code ?




--
You received this message because you are subscribed to the Google 
Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to mezzanine-users+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Mezzanine 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] How to resize image on upload ?

2018-11-24 Thread Danny

On 25/11/2018 3:43 am, Nicolas Pinault wrote:



Hi,

Le 14/10/2018 à 02:33, Danny a écrit :

On 13/10/2018 11:41 PM, 3...@drpi.fr wrote:

Hi,

When uploading images in blog post or in media library, I get an 
error saying the file size is too big.
I don't want to modify the file size limit, my images come from a 
DSLR generating big files.
What I'd like, this is to be able to resize uploaded images 
automatically.

I this possible ?


How would this work? In order for the server to do the resizing 
(which I guess is what you want, as that's where Pillow is 
installed), you'd have to upload the full file, and then allow the 
server to resize it - in which case, you're uploading the large file 
anyway, so you'd have to remove the file size limit to allow 
grapelli to upload that size file.


If you want to resize the file locally before uploading - why would 
this be a feature of Mezzanine, which is server-based? Can't you 
just resize the pictures yourself using any photo app on your local 
computer/device, and then do the upload?

There are 3 ways of doing the resize :
1) Server side. I have to authorize bigger files to be uploaded. 
Then, how do I resize the image ?


It looks like this is the best option.
So, how do I resize the image when it is uploaded ? 


Use Pillow to do the resizing (https://pillow.readthedocs.io/en/5.3.x/ 
)  but I'm not sure where in the Mezzanine code to put this - possibly 
as part of a filebrowser or grapelli fork?




--
You received this message because you are subscribed to the Google Groups "Mezzanine 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] How to resize image on upload ?

2018-11-24 Thread Nicolas Pinault




Hi,

Le 14/10/2018 à 02:33, Danny a écrit :

On 13/10/2018 11:41 PM, 3...@drpi.fr wrote:

Hi,

When uploading images in blog post or in media library, I get an 
error saying the file size is too big.
I don't want to modify the file size limit, my images come from a 
DSLR generating big files.
What I'd like, this is to be able to resize uploaded images 
automatically.

I this possible ?


How would this work? In order for the server to do the resizing 
(which I guess is what you want, as that's where Pillow is 
installed), you'd have to upload the full file, and then allow the 
server to resize it - in which case, you're uploading the large file 
anyway, so you'd have to remove the file size limit to allow grapelli 
to upload that size file.


If you want to resize the file locally before uploading - why would 
this be a feature of Mezzanine, which is server-based? Can't you just 
resize the pictures yourself using any photo app on your local 
computer/device, and then do the upload?

There are 3 ways of doing the resize :
1) Server side. I have to authorize bigger files to be uploaded. Then, 
how do I resize the image ?


It looks like this is the best option.
So, how do I resize the image when it is uploaded ?


2) Client side. This is feasible with javascript. Mezzanine is server 
based. This does not mean the client is completely dumb. If it was, 
why use javascript libraries (on the client side) ? So, how can I 
achieve client side resize ?
3) Using a local app. The person that will enter blog posts has 
difficulties using computers. The simpler, the better. I prefer to 
avoid this method.


Nicolas


Seeya. Danny.
--


--
You received this message because you are subscribed to the Google Groups "Mezzanine 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] How to resize image on upload ?

2018-10-15 Thread Nicolas Pinault

Hi,

Le 14/10/2018 à 02:33, Danny a écrit :

On 13/10/2018 11:41 PM, 3...@drpi.fr wrote:

Hi,

When uploading images in blog post or in media library, I get an 
error saying the file size is too big.
I don't want to modify the file size limit, my images come from a 
DSLR generating big files.
What I'd like, this is to be able to resize uploaded images 
automatically.

I this possible ?


How would this work? In order for the server to do the resizing (which 
I guess is what you want, as that's where Pillow is installed), you'd 
have to upload the full file, and then allow the server to resize it - 
in which case, you're uploading the large file anyway, so you'd have 
to remove the file size limit to allow grapelli to upload that size file.


If you want to resize the file locally before uploading - why would 
this be a feature of Mezzanine, which is server-based? Can't you just 
resize the pictures yourself using any photo app on your local 
computer/device, and then do the upload?

There are 3 ways of doing the resize :
1) Server side. I have to authorize bigger files to be uploaded. Then, 
how do I resize the image ?
2) Client side. This is feasible with javascript. Mezzanine is server 
based. This does not mean the client is completely dumb. If it was, why 
use javascript libraries (on the client side) ? So, how can I achieve 
client side resize ?
3) Using a local app. The person that will enter blog posts has 
difficulties using computers. The simpler, the better. I prefer to avoid 
this method.


Nicolas


Seeya. Danny.
--
You received this message because you are subscribed to the Google 
Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to mezzanine-users+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Mezzanine 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] How to resize image on upload ?

2018-10-13 Thread Danny

On 13/10/2018 11:41 PM, 3...@drpi.fr wrote:

Hi,

When uploading images in blog post or in media library, I get an error 
saying the file size is too big.
I don't want to modify the file size limit, my images come from a DSLR 
generating big files.

What I'd like, this is to be able to resize uploaded images automatically.
I this possible ?


How would this work? In order for the server to do the resizing (which I 
guess is what you want, as that's where Pillow is installed), you'd have 
to upload the full file, and then allow the server to resize it - in 
which case, you're uploading the large file anyway, so you'd have to 
remove the file size limit to allow grapelli to upload that size file.


If you want to resize the file locally before uploading - why would this 
be a feature of Mezzanine, which is server-based? Can't you just resize 
the pictures yourself using any photo app on your local computer/device, 
and then do the upload?


Seeya. Danny.

--
You received this message because you are subscribed to the Google Groups "Mezzanine 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.