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.7.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 545 (context shows lines 535-549 in substitute_image():532)
## 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 342 (context shows lines 332-346 in destination():309)
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 356 (context shows lines 346-360 in destination():309)
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;