no_image_rewrite — prevent image locations from being altered
This pragma prevents image locations in Interchange pages from being altered.
Interchange normally rewrites image locations to point to ImageDir
(or ImageDirSecure
). This applies to image locations mentioned in <img src="">, <input src="">, <body background="">, <table background=""> and table subelements (<th>, <tr> and <td>).
Example: Image path rewriting example
If the no_image_rewrite
pragma is
disabled and
ImageDir
is set to "/standard/images", an image URL
like:
<img src="fancy.gif">
would be changed to:
<img src="/standard/images/fancy.gif">
With the directive enabled, the image URLs would be left intact.
Interchange 5.9.0 (4/4 contexts shown):
Source: code/SystemTag/unpack.coretag
Line 40 (context shows lines 30-44)
} } } } else { for(@Vend::Output) { Vend::Interpolate::substitute_image($_); } } undef $Vend::MultiOutput; $::Pragma->{no_image_rewrite} = 1; Vend::Page::templatize($template); return; } EOR
Source: lib/Vend/Interpolate.pm
Line 543 (context shows lines 533-547 in substitute_image():530)
## Allow no substitution of downloads return if $::Pragma->{download}; ## If post_page routine processor returns true, return. Otherwise, ## continue image rewrite if($::Pragma->{post_page}) { Vend::Dispatch::run_macro($::Pragma->{post_page}, $text) and return; } unless ( $::Pragma->{no_image_rewrite} ) { my $dir = $CGI::secure ? ($Vend::Cfg->{ImageDirSecure} || $Vend::Cfg->{ImageDir}) : $Vend::Cfg->{ImageDir};
Source: lib/Vend/Parse.pm
Line 340 (context shows lines 330-344 in destination():307)
return unless $attr; #::logDebug("destination extended output settings"); my $fary = $Vend::OutFilter{$name}; if ($name) { $Vend::MultiOutput = 1; if(! $Vend::OutFilter{''}) { my $ary = []; push @$ary, \&Vend::Interpolate::substitute_image unless $::Pragma->{no_image_rewrite}; $Vend::OutFilter{''} = $ary; } if(! $fary) {
Source: lib/Vend/Parse.pm
Line 354 (context shows lines 344-358 in destination():307)
if(! $fary) { $fary = $Vend::OutFilter{$name} = []; if($attr->{output_filter}) { my $filt = $attr->{output_filter}; push @$fary, sub { my $ref = shift; $$ref = Vend::Interpolate::filter_value($filt, $$ref); return; }; } if (! $attr->{no_image_parse} and ! $::Pragma->{no_image_rewrite}) { push @$fary, \&Vend::Interpolate::substitute_image; } if ($attr->{output_extended}) { $Vend::OutExtended{$name} = $attr;