How to add webp support in CK Editor in Drupal? - drupal

Drupal 9.3.9
Webp images were not loaded into the Media Library. I went to Media types -> Image -> Edit and added webp to the "Allowed file extensions" field - after that, webp images began to load
Now I noticed that web images are not loaded into CK Editor when editing any page. Writes that "The selected file bg_main_0.webp cannot be uploaded. Only files with the following extensions are allowed: gif, png, jpg, jpeg."
I went to Structure -> Content types -> Article -> Manage fields - Edit and also added webp to the "Allowed file extensions" field - it didn't help
Tell me, please, where to dig?

You should drag and drop separate 'Insert from Media Library' button into CKEditor toolbar.

Related

How to enable media (post type) files while searching in Gutenberg editor link block?

I am using Gutenberg editor and while adding link to the text, i wants to link to existing uploaded media file. For that when i search for the name it search only the page/post. Addition to that, need to search the media post type as well. Please advise.

How can i add list(image) field in drupal 7?

I'm using Drupal 7 + Ubercart. Have to add a field with easy selecting from images (52 logo images of producers), that are already uploaded and will be used every time, when i'm adding new product.
Use Media module. From media documentation
Media provides a multimedia browser which allows a user to view and
search through all of the multimedia currently added to a site.
After enabling the module, go to your content type Manage fields page, and change the widget of your image field to Media file selector.
Screenshot for your field settings.
Screenshot for Media browser

custom module in Drupal 6.26

I am working in Drupal 6.26. I am developing a custom module, in which i am i want to upload file in node creation page. I want an option to upload image, like there should be file upload component and a upload button. So when admin select a file and click on submit button file has to get saved in a folder and need to save the path in database. After upload the image thumbnail should appear with remove button. When the admin clicks on remove button the image thumbnail should disappear and file upload component has to displayed with upload button. On save of the node, the image path has to map with node. This is similar to cck file upload option. Please help me to do this. Thanks.
this would be a complex form using AHAH (AJAX) behaviour to both get the thumbnail displayed and the remove button functionality.
I would recommend starting off by studying the File upload and CCK code so you can define simple form using the Form API and then adding to it some AHAH magic.
You can get a good example of a AHAH module in Drupal 6 here

Upload audio video files in Wordpress post/page

How could I upload audio/video files in my wordpress post or page?
Indeed there is an icon buttons to upload both type of files but when I used the Add Video button, browse a video file & update my post, I surprised that it only showed a link of that video file and when I vied it's HTML there were no tag of ....
So how it is possible to add audio/video file in wordpress post/page form my Dashboard Panel means I don't want to copy/paste embed code from youtube or some where else in my HTML code.
Like for audio I found
[audio http://wpcom.files.wordpress.com/2007/01/mattmullenweg-interview.mp3|width=180]
similarly for video I found
<embed src="http://wpcom.files.wordpress.com/2007/01/mattmullenweg-interview.mp3" width=180></embed>
that are not the best way to add 100s of audio/video files in Wordpress post/page..!
Thanks..
In order to display a video in Wordpress you need to embed using the HTML5 "Video for everybody" method or another video player. There are plugins that help you achieve this.

How can we select existing image for image field?

I need to select existing image for image field not new upload of image in drupal6X
The IMCE module lets you browse images on the server and select them for inclusion in your compose field.
Its very late but...here is the answer IMCE Filefield
Cheers!!!
There is also the ImageField Assist module. Inserting already uploaded images is as easy as clicking an image button. Some details about it (from its project page):
This module can use every single ImageField field added to any node in a Drupal 6 website, and uses ImageCache presets to display it.

Resources