wordpress-mobile / WordPress-Editor-Android

⛔️ [DEPRECATED] A reusable Android rich text editor component.
GNU General Public License v2.0
188 stars 50 forks source link

Editor: uploads not respecting max upload size #440

Open jeremeylduvall opened 8 years ago

jeremeylduvall commented 8 years ago

Expected behavior

I set a custom max upload size for my site within the app under Settings -> Default Image Width of 100px. I expected any image I upload to be limited to 100px wide and set a corresponding height.

Actual behavior

I uploaded an image that is 6000 × 4000 by default (image link). When I uploaded it and posted to my site, it posted as 528px wide, which was not the original width nor the specified width. When I went in to edit the image, I saw 528px on the size.

screen shot 2016-07-27 at 2 59 33 pm

As soon as I touched the slider though, it reset to 100px.

screen shot 2016-07-27 at 3 00 05 pm

Steps to reproduce the behavior

  1. Set a custom upload size for your site under Settings within the app.
  2. Add a much larger photo to your media library.
  3. Start a new post and try to add that image from step 2 to your post. It should follow the width set in step 1, but it didn't in my testing.
    Tested using the ARC Welder mentioned in p7cLQ7-9W-p2 with the 5.6 apk

Also reported in 117713-h.

rachelmcr commented 8 years ago

Does this only happen when you upload the image to your media library first, and then add the image from your media library to the post?

When I test with your steps, I reproduce the issue. In this case, it looks like the upload to the media library does not respect the "Default Image Width" setting in the site's settings.

However, if I test with these steps, my image is uploaded with the default image width I have set:

  1. Set a default image width (e.g. 100px) for your site under Settings within the app
  2. Start a new post and add an image from the device gallery
  3. Publish the post

The image is uploaded to the media library at the specified size (e.g. image width of 100px) and the image in the published post is the same size.

jeremeylduvall commented 8 years ago

Confirmed. I receive the same behavior. It looks like this only happens when I add an item to my media library first. I'm not sure if this is expected behavior or not. It seems like the upload to media library should work the same way with the default image width.