How to overwrite icon/image path with diazo - plone

how can i overwrite images/icons from plone with theme-specific icons from my theme?
i want to turn
<img width="16" height="16" alt="Image" src="http://127.0.0.1:8080/plone/image.png">
into
<img width="16" height="16" alt="Image" src="http://127.0.0.1:8080/plone/++theme++mytheme/image.png">

The simplest way to make this particular change is to simply set ++theme++mytheme/image.png as the icon for the Image type in portal_types either through the web or with a generic setup profile.
If you must make the change in diazo, then you could use:
<replace css:content="img[src$=/image.png]"><img width="16" height="16" alt="Image" src="image.png" /></replace>

Related

How to stop WordPress creating multiple copies of images but keeping the size info?

I was wondering if it is possible to stop WordPress from creating multiple copies of imagens, but still keeping, let's say, "medium" size.
I already edited my functions.php and the media options, leaving it all to "0", and it's fine. But, when I add an image do my post, the code reads as follow:
<img src="http://example.com/wp-content/uploads/2019/08/image.jpg" alt="" width="2008" height="1004" class="aligncenter size-full wp-image-XXXX" /></a>
I am using Jetpack and, for design reasons, I need the code to add the size to the image and change the "size-xxxx" class. For example:
<img src="http://example.com/wp-content/uploads/2019/08/image-1280x600.jpg" alt="" width="1280" class="aligncenter size-large wp-image-XXXX" /></a>
I can do this all manually, yes. But is there a way that I don't need to type this things everytime? Thank you!

Images not shown properly in ASP.NET MVC

I am trying to use some images with ASP.NET MVC. I've created a folder to store them and then I've pulled them from the solution explorer to code.
View code :
<a asp-area="" asp-controller="Home" asp-action="Index" class="navbar-brand">
<img src="~/Images/Logo.png" width="125" height="74" class="img-responsive" />
<img src="~/Images/Logo.png" />
</a>
Code of the page when inspected on Google Chrome :
<img src="/Images/Logo.png" width="125" height="74" class="img-responsive">
When I run the application they appeared broken on the browser. I have checked the path, properties, and everything is correct, but I can't fix this.
you could trying using #Raw
<dd>
<img src="~/Images/#Html.Raw(Model.PhotoUrl)" alt="Image" style="width: 500px; height: 300px;"/>
</dd>
Just found the problem. I create a folder name "Images" in solution explorer to store all my images, but that was conflit with the forder "images" in the "CSS" folder. I move my image to the "image" folder in "CSS" folder and everything works perfect.

Put a pop-up text on hover of mouse

I have an image like this one:
<img class="alignnone size-full wp-image-262" src="http:/localhost/wp-content/uploads/2017/10/myimage.png" alt="" width="352" height="343" />
I would like to put text in a box and this appears when the mouse hovers on from the image. How is it possible to make it?
You can use:
<img ... title="TEXT HERE">
Here's a quick JSFiddle demo for you.
https://jsfiddle.net/23vbh1ov/
<img src="http://dev.benchanmusic.com/wp-content/uploads/2017/07/cropped-cropped-me_blackandwhite.jpg" alt="" width="352" height="343" title="TEXT HERE" />
You should also fill in the "alt" property, as it's used for search engine indexing as well as if the image itself fails to load for any reason.

Images not showing on Amp version

Images work on normal page but the amp-version the images doesn't show.
here is a HTML code of a picture, I use WordPress and upload via media library and insert:
<img class="aligncenter wp-image-312" src="http://mysiteexample.com/wp-content/uploads/2016/11/review-1024x768.jpg" alt="Stanley Review" width="256" height="192" />
"
Is there a script I need to insert or something for it to work on amp?
Thanks for your time, I appreciate it.
Use amp-img instead of img for the amp version of your site.
<a href="#">
<amp-img src="http://mysiteexample.com/wp-content/uploads/2016/11/review-1024x768.jpg" width="256" height="192" layout="responsive" alt="Stanley Review"></amp-img>
</a>

Html is being truncated on save in drupal (full html)

If I unput a certain piece html into my page, it seems to be truncating:
<div id="slideshow">
<img style="cursor: pointer;" src="files:img/slideshow/3.png" id="left_slide" alt=""/>
<img style="cursor: pointer;" src="files:img/slideshow/1.png" id="center_slide" alt=""/>
<img style="cursor: pointer;" src="files:img/slideshow/2.png" id="right_slide" alt=""/>
</div>
It all looks good in the preview, but when I save it it becomes:
<div id="slideshow">
<img style="cursor: pointer;" src="http://local.drupal.com/sites/default/files/img/slideshow/3.png" id="left_slide" alt="" />
</div>
I'm at a loss! I'm not using any nasty WYSIWYG editors and the input format is full html. The second code example indicates that I'm using the path filter module but I've also tried disabling that and resaving. It still truncates.
I'm using Drupal 6.19.
You certainly print the teaser only.
To publish to the front page the complete node Go to Administer > Content Management > Post Settings > Choose 'unlimited' from the 'length of trimmed post' select box.
You can also manually controlling the teaser break point by inserting:
<!--break-->
If you use a views you can control if you want to show the complete node or the teaser in the settings of the view.

Resources