silverstripe / silverstripe-assets

Silverstripe Assets component
BSD 3-Clause "New" or "Revised" License
9 stars 65 forks source link

Align rendering of image genercated by ImageShortCodeProvider with generic Image generation #596

Closed maxime-rainville closed 3 days ago

maxime-rainville commented 2 months ago

This PR aligns how ImageShortcodeProvider generates its HTML markup to be aligned with how regular images are generated.

This reduces complexity and makes it easy to customise the HTML markups.

Parent issue

Depends on

maxime-rainville commented 1 month ago

The builds are red because they depend on the framework PR. I've created a branch of the sink to test this https://github.com/creative-commoners/recipe-kitchen-sink/actions/runs/9265818257

maxime-rainville commented 4 weeks ago

Not sure what I was thinking there. I added a bit of logic to suppress the width/height attribute instead of outputting auto.

maxime-rainville commented 2 weeks ago

https://github.com/silverstripe/silverstripe-framework/pull/11286 fixes the framework issue. https://github.com/silverstripe/silverstripe-cms/pull/2971 fixes the cms issue. My implementation was double escaping entities. I fixed it and added a unit test to cover this scenario 9d529c7a3c6793895f6da76a83b39d1a4dc814c4