0

I have a custom webpart that displays information / fields pages. I want to create a field for the user insert an image on the page that will be the icon/Thumbnail.

(I need the image to be from the computer and not just a URL as the default fields indicate. I'm not sure how to do this, because the pages have the images of your content saved in another image library.)

I will customize the webpart to display this icon, with other information.

What is the best way to insert icon / image on a page?

0

You could upload the image to a library by REST API and then reference the image URL in current page.

You could check the sample "Code example 2: Upload a file in the same domain by using the REST API and jQuery" from below thread.

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/upload-a-file-by-using-the-rest-api-and-jquery

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.