madeyourday / contao-rocksolid-custom-elements

RockSolid Custom Elements Contao Extension
http://rocksolidthemes.com/de/contao/plugins/custom-content-elements
MIT License
48 stars 12 forks source link

Image Crop #42

Closed Messa1 closed 9 years ago

Messa1 commented 9 years ago

Ist es möglich die Skallierungsmethode zu wählen? Im Beispiel von euch für die Mitarbeiterliste konnte ich das entnehmen. Dadurch wird das Bild zwar neu erstellt und Center Center skaliert.

<?php if ($image = $this->arrData['getImageObject']($slides->image, array(1000, 800))): ?>

Wie kann ich die Skallierungsmethode noch abändern?

fritzmg commented 9 years ago

Mit dem dritten Wert des size arrays. Also zB

<?php if ($image = $this->arrData['getImageObject']($slides->image, array(1000, 800, 'proportional'))): ?>
ausi commented 9 years ago

Für Fragen zu Contao bitte an https://community.contao.org/ wenden. Der Issue-Tracker auf GitHub ist für Fehlerberichte gedacht.

xApep commented 3 years ago

@ausi or @fritzmg This does not work in Contao 4.11.5.

If you set size bigger then actual size of a source image it does not do anything, but if it is smaller then that, then it resize it.

ausi commented 3 years ago

@xApep https://community.contao.org/

fritzmg commented 3 years ago

@xApep that's normal, although if you use a pre-defined image size (either via the database or your config) Contao will "copy" the source image to assets/images/ (without resizing it) in this case, unless skip_if_dimensions_match is set to false.

xApep commented 3 years ago

@fritzmg I know this was not "normal" in contao 3, that is why i thought that something is buggy. Probably there is no way to force smaller images to crop to bigger sizes right?

fritzmg commented 3 years ago

@fritzmg I know this was not "normal" in contao 3, that is why i thought that something is buggy.

Yes, this changed in Contao 4. Contao 4 no longer upscales images, as this is unnecessary. If you want to upscale your images, you need to do it via CSS.

xApep commented 3 years ago

@fritzmg thank you for all the info.