Problème de taille de l'image de profil
-
10-12-2019 - |
Question
Lorsque vous téléchargez une image allant jusqu'à 300x300 pour les profils dans SharePoint 2013 - SP crée automatiquement des vignettes pour l'image pour une utilisation sur le site;Navigateur d'org, recherche de personnes, etc. Toutefois, si l'image est par exemple 300px hauteur et que seulement 200px largeur de large, la vignette est gracée mal (les peuples roulent / sommets de leur tête sont manquantes).
Je me rends compte que je ne peux pas beaucoup faire pour changer la façon dont SP fonctionne, mais si vous connaissez un outil de redimensionnement par lots (ajouter un rembourrage blanc à l'image) qui serait extrêmement utile car il y aurait environ 1000 images pour traiteravec.
La solution 2
In the end I used a tool called imagemagick from www.imagemagick.org
First I created a simple white square 300x300 for the background image to be under the actual user image - I realise there are other ways of using imagemagick to achieve the same thing but this seemed the simplest approach for me. The next step is to resize the images to a suitable size (i.e. 300px wide or 300px tall)
mogrify -path "c:\temp\Resized photos" -resize 300x300 "c:\temp\Resized photos"\*.*
for /f %%a IN ('dir /b /s "c:\temp\resize~1\*.*"') do call composite -gravity center %%a "c:\temp\background.png" %%a
Once that was complete I was able to run my profile image import as normal and have the user images not cropped incorrectly.
Autres conseils
goto site settings, under look and feel select image renditions.
here you can fiddle around to choose what you want to show with an image when sharepoint renders the profile image.
its found here:
select the image (thumbnail) by hovering over and click on edit renditions
these are the sizes to change to your liking:
click on the selected size to edit (scale is available)
now select your rendition that you want as default
unfortunatly, once the rendering has started it cant be saved. What i mean is when you upload an image to sharpeoint it saves three scales and those a saved and used... the origional image is not saved. so if it saved the images cropped than it will be using the cropped images. You would need to reupload the image otherwise!
full details can be found here: