SiteCore DAM assets not optimized - dam

I am using sitecore DAM for assets management(images and docs). Are the images optimized? When I run lighthouse, it shows the images are not optimized. This https://docs.stylelabs.com/contenthub/4.1.x/content/user-documentation/index.html does not give any info ! Any help is much appreciated. Thank you

In Content Hub, each asset has a set of renditions that comes OOTB. Typically preview and thumbnails are optimized for web use.
Here is documentation for the OOTB renditions:
https://docs.stylelabs.com/contenthub/4.1.x/content/user-documentation/manage-digital-assets/download/default-renditions.html
Now lets say you needed a particular rendition size you wanted to create for that asset, that is something you can do very easily with custom renditions:
https://docs.stylelabs.com/contenthub/4.1.x/content/user-documentation/manage-digital-assets/download/custom-download-parameters.html
You can even add new default renditions that can be produced on upload of new assets in the media processing. You can make it any size or even specify a new file format output. Check out this section for more detail:
https://docs.stylelabs.com/contenthub/4.1.x/content/user-documentation/manage/processing/media-processing/media-processing.html
I would also take some time to read up on use of public links:
https://docs.stylelabs.com/contenthub/4.1.x/content/user-documentation/manage-digital-assets/share/public-links/public-links.html

Related

How can can i insert a user with profile picture using Blazor-server

I want the user to upload his picture when he registers his information.
The thing is when the user uploads his image.. should automatically create a folder with his ID to be like this wwwroot/images/UserID/fadi.jpg
Basically: you really shouldn't. The wwwroot is for static assets used by the application. You're using server-side, so in theory it might be possible but that's not what the folder is meant for. An alternative method like AWS would be preferred, but if you can't do that (either because of payment requirements or other complications) I would suggest saving the image to your database. One way to do this would be to base64 encode the image and save it that way. I'm not going to give an example of that here, there are plenty available elsewhere. One such example is this.

Implementing JSon-LD Schema in Ektron, is it possible?

This is my first time using Ektron and i'm trying to implement Json-LD schema scripts for each page. I have 68 scripts that I need to implement that are unique for each page.
I thought I would be able to implement these scripts through meta data, but now i'm unsure. Each script is over 1000 characters, the html and meta tag types only allow 500 characters, so i'm assuming i'm in the wrong place. If anyone could shed some light it would be much appreciated.
Ektron's metadata isn't intended for large chunks of data / content. So, yes, you will find limits there.
Here are two things you might try as workarounds.
Most direct:
Use the Ektron Library. Go to the Library tab and click on the Root node and view Properties. Add an extension to allow you to upload your JSON-LD as a file. Use metadata on the content item to reference the uploaded file. Combine the two upon output.
If you want the JSON-LD to be editable within the CMS...
Gaming the platform a bit
Create a new SmartForm definition and include in it a single plain-text, multi-line field (not Rich text). This should hold your JSON-LD. Set up a folder and, if your version supports it (you didn't specify CMS version, so I will assume relatively recent), set the folder to be non-searchable so these things don't come up in site search results. Add a restriction to the folder to only allow the Smart Form definition you just created. Create your JSON-LD there using the plain-text field. You should be able to store up to 1MB.
Same as above, add your JSON-LD as text then use a reference to this item from the content you want to use it.
The metadata in this case (and possibly the library one, though I'd have to test and I don't have an Ektron environment for development anymore) will give you the Content ID for the object holding your JSON-LD. You'll have to make another API call but will give you the solution you appear to want from above.

Do I need to create folders in cloudinary?

I am building an new web application and want to use Cloudinary for users' images. My question is that do I need to create folders in my Cloudinary cloud? The reason I am asking is that if I were using a file system and start having 100,000+ images in one folder, it will start killing my app, and I would need to break then into several folders.
Is it the same for Cloudinary?
Thanks,
It depends on your current and future requirements.
In general, I believe that folders can help with better organizing your resources, especially when there are lots of them.
Note that besides folders, you can also assign tags to your images (e.g., by user) or add a prefix to the images' public IDs (e.g., user1-<image_name>).
You can later use Cloudinary's Admin API to list your resources either by folder/prefix or by tag.

Using ImageResizing with a custom naming convention

Hi I was looking in the imageresizing.net project to see if there is a plugin that handle this but I didnt find it.
I need to set up imageresizer to handle images with prefix, the prefix will define the size and different properties of the resized image.
Example is on disk we have the image
/Images/Folder1/12345.jpg
So the request would be like
/Images/Folder1/small_12345.jpg
So i need to handle the request, take the prefix (small in this case) and based on an xml decide what properties apply to the original image, transforming that to
/Images/Folder1/12345.jpg?w=100&h=75...
This bacause we already have that naming convention and we dont want to change that from our web app, but we are moving from have a batch processing of images everyday to do it on the fly with image resizer.
So the question is there a plugin for something like this or what solution do you recommend? I was thinking on create an httpmodule wrapper that intercept this kind of image names, read the configuration from the xml based on the prefix and call the new url with the image resizer format, thing is I dont want to redirect the user.
Thanks
This is basic URL rewriting - you can do it with any URL rewriting module, or using ImageResizer's own URL rewriting API - the Rewrite event.
The FolderResizeSyntax plugin is an example of this.

How to add comments etc to django-photologue photos?

I am trying to make use of a powerful feature in photologue which is batch uplad. The app comes with Pinax but not fully implemented. Pinax only makes use of 'Photos'. I want to add all comment,avatar, tags etc which come in a 'photo' page into the photos that are originally uploaded through zip upload.
I could not find any resources about this integration. So appreciate your hints.
Have you looked at the documentation at http://code.google.com/p/django-photologue/? This describes the gallery upload feature.