Be careful before applying this kind of “simplification”: it doesn't really simplify your life and makes the typescript harder to read and also to input, because you'll always be uncertain about the order of the arguments.
Here I propose a key-value interface; you just need to set up your editor to prepare input such as
\addpic{
width=,
image=,
caption=,
label=,
}
that you can then easily fill with data. For particular images you can add other keys, in order to specify different placement preferences, a short caption for the list of figures or additional keys to be passed to \includegraphics besides width=.
Note that with this interface the order of the keys is unimportant.
\documentclass{article}
\usepackage{xparse}
\usepackage{graphicx}
\ExplSyntaxOn
% the user level command
\NewDocumentCommand{\addpic}{m}
{
\group_begin: % localize the changes to the variables
\simonson_pic:n { #1 }
\group_end:
}
% the key-value interface
\keys_define:nn { simonson/pic }
{
placement .tl_set:N = \l_simonson_pic_placement_tl,
placement .initial:n = htp,
width .tl_set:N = \l_simonson_pic_width_tl,
width .initial:n = 1,
options .tl_set:N = \l_simonson_pic_options_tl,
image .tl_set:N = \l_simonson_pic_image_tl,
caption .tl_set:N = \l_simonson_pic_caption_tl,
shortcaption .tl_set:N = \l_simonson_pic_shortcaption_tl,
label .tl_set:N = \l_simonson_pic_label_tl,
}
% the main command
\cs_new_protected:Nn \simonson_pic:n
{
% set the keys from the argument
\keys_set:nn { simonson/pic } { #1 }
% start the figure environment
\__simonson_start_figure:V \l_simonson_pic_placement_tl
\centering
% include the image
\__simonson_pic_image:VVV
\l_simonson_pic_width_tl % the text width fraction
\l_simonson_pic_options_tl % other options
\l_simonson_pic_image_tl % the image name
% the caption
\tl_if_empty:NTF \l_simonson_pic_shortcaption_tl
{
\caption{\l_simonson_pic_caption_tl}
}
{
\caption[\l_simonson_pic_shortcaption_tl]{\l_simonson_pic_caption_tl}
}
% the label
\tl_if_empty:NF \l_simonson_pic_label_tl
{
\label{\l_simonson_pic_label_tl}
}
% end the figure environment
\end{figure}
}
% syntactic sugar: we want some token lists to be expanded before usage
\cs_new_protected:Nn \__simonson_start_figure:n
{
\begin{figure}[#1]
}
\cs_generate_variant:Nn \__simonson_start_figure:n { V }
\cs_new_protected:Nn \__simonson_pic_image:nnn
{
\includegraphics[width=#1\textwidth,#2]{#3}
}
\cs_generate_variant:Nn \__simonson_pic_image:nnn { VVV }
\ExplSyntaxOff
\begin{document}
\listoffigures
\pic{
width=0.3,
image=example-image,
caption={This is an example image, and a comma in the caption},
label=one,
}
\pic{
placement=bp,
width=0.2,
options={angle=90},
image=example-image-a,
caption=Rotated image,
shortcaption=In the text the image is rotated!,
}
\end{document}

As Zarko rightly comments, \pic is not a good name if you plan to use TikZ, so I changed it to \addpic.
boxhandlerpackage (http://ctan.org/pkg/boxhandler). – Steven B. Segletes May 05 '15 at 13:50\usepackage{graphicx}? Your code works here. – Sigur May 05 '15 at 13:52\pic{}{}{}{}and set the graphics path so that you can just use{layering-osgi-eps-converted-to}(no extension, no full path needed). – cfr May 05 '15 at 14:06[h!]it usually generates a warning that it is being changed to[!ht]but it is better to use[htp]or no option at all. Routinely using!is wrong, there is no point setting constraints then saying always ignore them. Either don't set them or usually follow them.!is just for emergency use. – David Carlisle May 05 '15 at 14:51%after the first{and after\end{figure}– David Carlisle May 05 '15 at 14:52%by any chance? – cfr May 05 '15 at 14:56