silverstripe / silverstripe-asset-admin

Silverstripe assets gallery for asset management
BSD 3-Clause "New" or "Revised" License
20 stars 79 forks source link

Remote file dialogue doesn't respect custom dimensions #854

Closed phptek closed 6 years ago

phptek commented 6 years ago

Using the "Insert Media via URL" TinyMCE feature, and fetching a remote image, or video; no matter what I put into the "Width" and "Height" user-input form fields, the image's (or video's placeholder image) original dimensions are maintained (as per login in the embed/embed dependency) and my custom ones overridden or ignored.

Also reported here - see for more detail: https://github.com/silverstripe/cwp/issues/160

maxime-rainville commented 6 years ago

Are you talking about the size in the CMS WYSIWYG editor or the size has rendered in the front end?

The CMS part seems to be working fine for me, but the front end isn't.

In the screen shot below, my YoutTube video should be 800px wide, but doesn't expand to fill up all the space available to it. image

phptek commented 6 years ago

Hi @maxime-rainville - I am talking soley abot the admin area of any given page. Specifically an inability to set a width and a height of a remote image inserted via TinyMCE's "Insert Media via URL" function.

1). Take the URL of an image from the web; e.g. https://img.scoop.it/kGys_9bQYEbbpjabNgPjr4XXXL4j3HpexhjNOf_P3YmryPKwJ94QGRtDb3Sbc6KY 2). On any page, select the "Insert Media via URL" button in TinyMCE 3). Paste the URL into the field and select the "Insert" button 4). Now input some custom dimensions for width and height 5). Observe that as soon as you start typing into the "width" or "height" field, that the above JS error appears in your console 6). Upon inserting the image into TinyMCE, view TinyMCE's own source and observe the file's original dimensions are still intact.

maxime-rainville commented 6 years ago

We did a bunch of patch releases this week, which should have fix this issue. I'll close this for now.

If upgrading to the latest patch release doesn't fix it, let me know and I'll reopen it.